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!)
A187274 a(n) = n*4^(n/2 - 1)*(9 + (-1)^n). 5

%I #44 Feb 18 2024 18:26:26

%S 0,4,20,48,160,320,960,1792,5120,9216,25600,45056,122880,212992,

%T 573440,983040,2621440,4456448,11796480,19922944,52428800,88080384,

%U 230686720,385875968,1006632960,1677721600,4362076160,7247757312,18790481920,31138512896,80530636800,133143986176,343597383680

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

%H G. C. Greubel, <a href="/A187274/b187274.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 1.

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

%F a(n) = 8*a(n-2) - 16*a(n-4). - _Colin Barker_, Jul 25 2013

%F G.f.: 4*x*(x+1)*(4*x+1) / ((2*x-1)^2*(2*x+1)^2). - _Colin Barker_, Jul 25 2013

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

%F a(n) = -(4^n) * a(-n) for all n in Z. - _Michael Somos_, Jul 10 2018

%e G.f. = 4*x + 20*x^2 + 48*x^3 + 160*x^4 + 320*x^5 + 960*x^6 + 1792*x^7 + ... - _Michael Somos_, Jul 10 2018

%p See A187272.

%t LinearRecurrence[{0,8,0,-16},{0,4,20,48},40] (* _Harvey P. Dale_, Dec 25 2014 *)

%o (Magma) /* By definition: */ [Integers()!(n*4^(n/2-1)*(9+(-1)^n)): n in [0..40]]; // _Bruno Berselli_, Mar 29 2016

%o (Magma) I:=[0,4,20,48]; [n le 4 select I[n] else 8*Self(n-2)-16*Self(n-4): n in [1..30]]; // _Vincenzo Librandi_, Mar 29 2016

%o (GAP) List([0..35],n->n*2^(n-2)*(9+(-1)^n)); # _Muniru A Asiru_, Jul 10 2018

%o (PARI) x='x+O('x^50); concat([0], Vec(4*x*(x+1)*(4*x+1)/((2*x-1)^2*(2*x+ 1)^2))) \\ _G. C. Greubel_, Aug 14 2018

%o (Python)

%o def A187274(n): return n<<n+1 if n&1 else 5*(n>>1)<<n # _Chai Wah Wu_, Feb 18 2024

%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 19 19:02 EDT 2024. Contains 371798 sequences. (Running on oeis4.)