login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A187272 a(n) = (n/4)*2^(n/2)*((1+sqrt(2))^2 + (-1)^n*(1-sqrt(2))^2). 6

%I #51 Feb 18 2024 12:05:17

%S 0,2,6,12,24,40,72,112,192,288,480,704,1152,1664,2688,3840,6144,8704,

%T 13824,19456,30720,43008,67584,94208,147456,204800,319488,442368,

%U 688128,950272,1474560,2031616,3145728,4325376,6684672,9175040,14155776,19398656,29884416,40894464,62914560,85983232

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

%H Vincenzo Librandi, <a href="/A187272/b187272.txt">Table of n, a(n) for n = 0..1000</a>

%H R. Kemp, <a href="http://dx.doi.org/10.1016/0012-365X(82)90123-6">On the number of words in the language {w in Sigma* | w = w^R }^2</a>, Discrete Math., 40 (1982), 225-234. See Lemma 6 (p. 228).

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

%F From _Bruno Berselli_, Mar 22 2011: (Start)

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

%F a(n)/a(n-2) = 2*n/(n-2). (End)

%F a(2*n) = 3*n*2^n, a(2*n+1) = (2*n+1)*2^(n+1). - _Andrew Howroyd_, Mar 28 2016

%p R:=(b,n)-> expand(simplify( (n/4)*b^(n/2)*((1+sqrt(b))^2+(-1)^n*(1-sqrt(b))^2) ));

%p [seq(R(2,n),n=0..100)];

%t CoefficientList[Series[2 x (1 + x) (1 + 2 x) / (1 - 2 x^2)^2, {x, 0, 40}], x] (* _Vincenzo Librandi_, Jun 19 2013 *)

%o (PARI) x='x+O('x^30); concat([0], Vec(2*x*(1+x)*(1+2*x)/(1-2*x^2)^2)) \\ _G. C. Greubel_, Nov 28 2017

%o (Magma) [Round((n/4)*2^(n/2)*((1+Sqrt(2))^2 + (-1)^n*(1-Sqrt(2))^2)): n in [0..30]]; // _G. C. Greubel_, Nov 28 2017

%o (Python)

%o def A187272(n): return (n<<(n+1>>1) if n&1 else 3*n<<(n-2>>1)) if n else 0 # _Chai Wah Wu_, Feb 18 2024

%Y Cf. A187273, A187274, A187275.

%Y Cf. A007055, A007056, A007057, A007058.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Mar 07 2011

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)