|
|
A117867
|
|
Number of palindromes (in base 8) below 8^n.
|
|
1
|
|
|
7, 14, 70, 126, 574, 1022, 4606, 8190, 36862, 65534, 294910, 524286, 2359294, 4194302, 18874366, 33554430, 150994942, 268435454, 1207959550, 2147483646, 9663676414, 17179869182, 77309411326, 137438953470, 618475290622, 1099511627774, 4947802324990
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 9*8^((n-1)/2)-2 (n odd), 2*8^(n/2)-2 (n even).
G.f.: 7*x*(x+1) / ((x-1)*(8*x^2-1)). - Colin Barker, Feb 15 2013
a(n) = a(n-1) + 8*a(n-2) - 8*a(n-3).
a(n) = (1/(4*sqrt(2)))*( -8*sqrt(2) + 9*(1 - (-1)^n)*2^(3*n/2) + (1 + (-1)^n)*2^((3*n+5)/2) ).
E.g.f.: 2*cosh(2*sqrt(2)*x) + (9/(2*sqrt(2)))*sinh(2*sqrt(2)*x) -2*cosh(x) - 2*sinh(x). (End)
|
|
MATHEMATICA
|
Table[If[OddQ[n], 9*8^((n-1)/2)-2, 2*8^(n/2)-2], {n, 1, 25}] (* or *) LinearRecurrence[{1, 8, -8}, {7, 14, 70}, 25] (* G. C. Greubel, Oct 27 2016 *)
Rest@ CoefficientList[Series[7 x (x + 1)/((x - 1) (8 x^2 - 1)), {x, 0, 27}], x] (* Michael De Vlieger, Oct 27 2016 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|