login
a(n) = 2*a(n-2) for n > 2; a(1) = 1, a(2) = 2.
27

%I #49 Feb 02 2024 19:53:49

%S 1,2,2,4,4,8,8,16,16,32,32,64,64,128,128,256,256,512,512,1024,1024,

%T 2048,2048,4096,4096,8192,8192,16384,16384,32768,32768,65536,65536,

%U 131072,131072,262144,262144,524288,524288,1048576,1048576,2097152,2097152

%N a(n) = 2*a(n-2) for n > 2; a(1) = 1, a(2) = 2.

%C a(n+1) is the number of palindromic words of length n using a two-letter alphabet. - _Michael Somos_, Mar 20 2011

%H Vincenzo Librandi, <a href="/A163403/b163403.txt">Table of n, a(n) for n = 1..1000</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0,2).

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

%F G.f.: x*(1 + 2*x)/(1 - 2*x^2).

%F a(n) = A051032(n) - 1.

%F G.f.: x / (1 - 2*x / (1 + x / (1 + x))) = x * (1 + 2*x / (1 - x / (1 - x / (1 + 2*x)))). - _Michael Somos_, Jan 03 2013

%F From _R. J. Mathar_, Aug 06 2009: (Start)

%F a(n) = A131572(n).

%F a(n) = A060546(n-1), n > 1. (End)

%F a(n+3) = a(n+2)*a(n+1)/a(n). - _Reinhard Zumkeller_, Mar 04 2011

%F a(n) = |A009116(n-1)| + |A009545(n-1)|. - _Bruno Berselli_, May 30 2011

%F E.g.f.: cosh(sqrt(2)*x) + sinh(sqrt(2)*x)/sqrt(2) - 1. - _Stefano Spezia_, Feb 05 2023

%e x + 2*x^2 + 2*x^3 + 4*x^4 + 4*x^5 + 8*x^6 + 8*x^7 + 16*x^8 + 16*x^9 + 32*x^10 + ...

%t LinearRecurrence[{0, 2}, {1, 2}, 50] (* _Paolo Xausa_, Feb 02 2024 *)

%o (Magma) [ n le 2 select n else 2*Self(n-2): n in [1..43] ];

%o (PARI) {a(n) = if( n<1, 0, 2^(n\2))} /* _Michael Somos_, Mar 20 2011 */

%o (Sage)

%o def A163403():

%o x, y = 1, 1

%o while True:

%o yield x

%o x, y = x + y, x - y

%o a = A163403(); [next(a) for i in range(40)] # _Peter Luschny_, Jul 11 2013

%Y Equals A016116 without initial 1. Unsigned version of A152166.

%Y Partial sums are in A136252.

%Y Binomial transform is A078057, second binomial transform is A007070, third binomial transform is A102285, fourth binomial transform is A163350, fifth binomial transform is A163346.

%Y Cf. A000079 (powers of 2), A009116, A009545, A051032.

%Y The following sequences are all essentially the same, in the sense that they are simple transformations of each other, with A029744 = {s(n), n>=1}, the numbers 2^k and 3*2^k, as the parent: A029744 (s(n)); A052955 (s(n)-1), A027383 (s(n)-2), A354788 (s(n)-3), A347789 (s(n)-4), A209721 (s(n)+1), A209722 (s(n)+2), A343177 (s(n)+3), A209723 (s(n)+4); A060482, A136252 (minor differences from A354788 at the start); A354785 (3*s(n)), A354789 (3*s(n)-7). The first differences of A029744 are 1,1,1,2,2,4,4,8,8,... which essentially matches eight sequences: A016116, A060546, A117575, A131572, A152166, A158780, A163403, A320770. The bisections of A029744 are A000079 and A007283. - _N. J. A. Sloane_, Jul 14 2022

%K nonn,easy

%O 1,2

%A _Klaus Brockhaus_, Jul 26 2009