|
|
A117863
|
|
Number of palindromes (in base 4) below 4^n.
|
|
1
|
|
|
3, 6, 18, 30, 78, 126, 318, 510, 1278, 2046, 5118, 8190, 20478, 32766, 81918, 131070, 327678, 524286, 1310718, 2097150, 5242878, 8388606, 20971518, 33554430, 83886078, 134217726, 335544318, 536870910, 1342177278, 2147483646, 5368709118, 8589934590
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = 5*4^((n-1)/2)-2 (n odd), 2*4^(n/2)-2 (n even).
G.f.: 3*x*(x+1) / ((x-1)*(2*x-1)*(2*x+1)). [Colin Barker, Feb 15 2013]
a(1)=3, a(2)=6, a(3)=18, a(n)=a(n-1)+4*a(n-2)-4*a(n-3). - Harvey P. Dale, May 09 2013
|
|
MATHEMATICA
|
Rest[CoefficientList[Series[3x (x+1)/((x-1)(2x-1)(2x+1)), {x, 0, 40}], x]] (* or *) LinearRecurrence[{1, 4, -4}, {3, 6, 18}, 40] (* Harvey P. Dale, May 09 2013 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,easy,changed
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|