login
A117864
Number of palindromes (in base 5) below 5^n.
1
4, 8, 28, 48, 148, 248, 748, 1248, 3748, 6248, 18748, 31248, 93748, 156248, 468748, 781248, 2343748, 3906248, 11718748, 19531248, 58593748, 97656248, 292968748, 488281248, 1464843748, 2441406248, 7324218748, 12207031248, 36621093748, 61035156248
OFFSET
1,1
FORMULA
a(n) = 6*5^((n-1)/2)-2 (n odd), 2*5^(n/2)-2 (n even).
a(1)=4, a(2)=8, a(3)=28, a(n)=a(n-1)+5*a(n-2)-5*a(n-3). - Harvey P. Dale, May 30 2012
G.f.: 4*x*(x+1) / ((x-1)*(5*x^2-1)). - Colin Barker, Apr 26 2015
a(n) = 4*A238366(n-1). - Michel Marcus, Apr 26 2015
MATHEMATICA
pal5s[n_]:=If[OddQ[n], 6 5^((n-1)/2)-2, 2 5^(n/2)-2]; Array[pal5s, 40] (* or *) LinearRecurrence[{1, 5, -5}, {4, 8, 28}, 40] (* Harvey P. Dale, May 30 2012 *)
PROG
(PARI) Vec(4*x*(x+1)/((x-1)*(5*x^2-1)) + O(x^100)) \\ Colin Barker, Apr 26 2015
CROSSREFS
Cf. A050250.
Sequence in context: A099513 A104042 A338429 * A020138 A306448 A090083
KEYWORD
nonn,base,easy
AUTHOR
Martin Renner, May 02 2006
EXTENSIONS
More terms from Harvey P. Dale, May 30 2012
STATUS
approved