login
2^(2n+1)-5*2^(n-1)-1.
2

%I #20 Jun 09 2022 02:32:20

%S 2,21,107,471,1967,8031,32447,130431,523007,2094591,8383487,33544191,

%T 134197247,536829951,2147401727,8589770751,34359410687,137438298111,

%U 549754503167,2199020634111

%N 2^(2n+1)-5*2^(n-1)-1.

%C 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

%H <a href="/index/Rec#order_03">Index entries for linear recurrences with constant coefficients</a>, signature (7,-14,8).

%F a(n) = 2^(2n+1)-2^(n+1)-2^(n-1)-1.

%F A052539(n) = a(n)-2*a(n-1) for n>1.

%F 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

%F a(n) = 2*4^n - 5*2^(n-1) - 1. - _Karl V. Keller, Jr._, Jun 09 2022

%e first 6 term in binary starting with n=2 are 10101,1101011,111010111,11110101111,1111101011111,111111010111111

%t 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 *)

%o (Python) print([2*4**n - 5*2**(n-1) - 1 for n in range(1, 50)]) # _Karl V. Keller, Jr._, Jun 09 2022

%Y Cf. A267705.

%K nonn,easy

%O 1,1

%A _Brad Clardy_, Apr 03 2011