OFFSET
0,2
COMMENTS
Previous name: "A palindromic sequence whose n-th term digits sum to 2n. (See Formula for definition.)"
a(0) = 0; for n > 0, a(n) is the k-digit number having 1 (for odd n) or 2 (for even n) as its first and last digits, and 4 for each of the remaining k-2 digits, where k = floor((n+3)/2).
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,11,0,-10).
FORMULA
a(n) = 10^(n/2)*(11/9 + 13*sqrt(10)/18 + (11/9 - 13*sqrt(10)/18)*(-1)^n) + (-1)^n/2 - 53/18.
From Colin Barker, Nov 19 2016: (Start)
a(n) = 11*a(n-2) - 10*a(n-4) for n > 3.
G.f.: x*(11 + 22*x + 20*x^2) / ((1 - x)*(1 + x)*(1 - 10*x^2)).
(End)
MATHEMATICA
LinearRecurrence[{0, 11, 0, -10}, {0, 11, 22, 141}, 50] (* G. C. Greubel, Nov 20 2016 *)
PROG
(PARI) concat(0, Vec(x*(11 + 22*x + 20*x^2) / ((1 - x)*(1 + x)*(1 - 10*x^2)) + O(x^30))) \\ Colin Barker, Nov 19 2016
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Paul Barry, May 15 2004
STATUS
approved
