A168251 a(n) = n^2 if n is odd, n^2*2^(n-2) if n is even.
0, 1, 4, 9, 64, 25, 576, 49, 4096, 81, 25600, 121, 147456, 169, 802816, 225, 4194304, 289, 21233664, 361, 104857600, 441, 507510784, 529, 2415919104, 625, 11341398016, 729, 52613349376, 841, 241591910400, 961, 1099511627776, 1089, 4964982194176, 1225
Offset: 0
Links
- G. C. Greubel, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (0, 15, 0, -87, 0, 245, 0, -348, 0, 240, 0, -64).
Programs
-
Magma
[(n^2)*2^((n-2)*(1+(-1)^n) div 2): n in [0..40]]; // Vincenzo Librandi, Jul 17 2016
-
Maple
A168251 := proc(n) if type(n,'even') then n^2*2^n/4 ; else n^2 ; end if; end proc: # R. J. Mathar, Sep 20 2011
-
Mathematica
Table[(n^2)*2^((n - 2)*(1 + (-1)^n)/2), {n, 0, 50}] (* G. C. Greubel, Jul 16 2016 *) Table[If[OddQ[n],n^2,n^2 2^(n-2)],{n,0,50}] (* or *) LinearRecurrence[{0,15,0,-87,0,245,0,-348,0,240,0,-64},{0,1,4,9,64,25,576,49,4096,81,25600,121},41] (* Harvey P. Dale, May 14 2022 *)
Formula
a(n) = +15*a(n-2) -87*a(n-4) +245*a(n-6) -348*a(n-8) +240*a(n-10) - 64*a(n-12).
G.f.: x*(1 + 4*x - 6*x^2 + 4*x^3 - 23*x^4 - 36*x^5 + 212*x^6 + 44*x^7 - 336*x^8 - 16*x^9 - 64*x^10) / ( (1-x)^3*(2*x+1)^3*(1-2*x)^3*(1+x)^3 ). - R. J. Mathar, Sep 20 2011
a(n) = (n^2)*2^((n-2)*(1+(-1)^n)/2). - Luce ETIENNE, Feb 03 2015
Comments