A117857 Number of palindromes of length n (in base 5).
4, 4, 20, 20, 100, 100, 500, 500, 2500, 2500, 12500, 12500, 62500, 62500, 312500, 312500, 1562500, 1562500, 7812500, 7812500, 39062500, 39062500, 195312500, 195312500, 976562500, 976562500, 4882812500, 4882812500, 24414062500, 24414062500, 122070312500
Offset: 1
Links
- Index entries for linear recurrences with constant coefficients, signature (0,5).
Crossrefs
Cf. A050683.
Programs
-
Maple
A117857:=n->4*5^floor((n-1)/2): seq(A117857(n), n=1..40); # Wesley Ivan Hurt, Apr 18 2017
-
Mathematica
LinearRecurrence[{0,5},{4,4},40] (* or *) With[{c=NestList[ 5#&,4,20]},Riffle[ c,c]] (* Harvey P. Dale, Apr 18 2019 *)
Formula
a(n) = 4*5^floor((n-1)/2).
a(n) = 5*a(n-2). G.f.: -4*x*(x+1)/(5*x^2-1). [Colin Barker, Feb 15 2013]
Extensions
More terms from Colin Barker, Feb 15 2013