OFFSET
1,1
COMMENTS
Starting with n=2, binary palindromic numbers of the form (n-1)010(n-1) where n is the index and the number of 1's
LINKS
Index entries for linear recurrences with constant coefficients, signature (7,-14,8).
FORMULA
a(n) = 2^(2n+1)-2^(n+1)-2^(n-1)-1.
A052539(n) = a(n)-2*a(n-1) for n>1.
a(n)= +7*a(n-1) -14*a(n-2) +8*a(n-3). G.f. ( x*(-2-7*x+12*x^2) ) / ( (x-1)*(2*x-1)*(4*x-1) ). - R. J. Mathar, Apr 04 2011
a(n) = 2*4^n - 5*2^(n-1) - 1. - Karl V. Keller, Jr., Jun 09 2022
EXAMPLE
first 6 term in binary starting with n=2 are 10101,1101011,111010111,11110101111,1111101011111,111111010111111
MATHEMATICA
Table[2^(2n+1)-5 2^(n-1)-1, {n, 20}] (* or *) Rest[CoefficientList[ Series[(x(-2-7x+12x^2))/((x-1)(2x-1)(4x-1)), {x, 0, 20}], x]] (* Harvey P. Dale, Apr 19 2011 *)
PROG
(Python) print([2*4**n - 5*2**(n-1) - 1 for n in range(1, 50)]) # Karl V. Keller, Jr., Jun 09 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Brad Clardy, Apr 03 2011
STATUS
approved