[go: up one dir, main page]

login
A057029
Central column of arrays in A057027 and A057028.
5
1, 6, 12, 27, 39, 64, 82, 117, 141, 186, 216, 271, 307, 372, 414, 489, 537, 622, 676, 771, 831, 936, 1002, 1117, 1189, 1314, 1392, 1527, 1611, 1756, 1846, 2001, 2097, 2262, 2364, 2539, 2647, 2832, 2946, 3141, 3261, 3466, 3592, 3807, 3939, 4164, 4302, 4537
OFFSET
1,2
FORMULA
a(n) = C(2n-1, 2)+(n+1)/2 if n is odd, else a(n) = C(2n, 2)-(n-2)/2.
From Colin Barker, Jul 02 2016: (Start)
a(n) = (5-(-1)^n+2*(-4+(-1)^n)*n+8*n^2)/4.
a(n) = (4*n^2-3*n+2)/2 for n even, a(n) = (4*n^2-5*n+3)/2 for n odd.
a(n) = a(n-1)+2*a(n-2)-2*a(n-3)-a(n-4)+a(n-5) for n>5.
G.f.: x*(1+5*x+4*x^2+5*x^3+x^4) / ((1-x)^3*(1+x)^2). (End)
E.g.f.: ((2 - x + 4*x^2)*cosh(x) + (3 + x + 4*x^2)*sinh(x) - 2)/2. - Stefano Spezia, Sep 10 2024
MAPLE
A057029:=n->(5-(-1)^n+2*(-4+(-1)^n)*n+8*n^2)/4: seq(A057029(n), n=1..80); # Wesley Ivan Hurt, Jul 03 2016
MATHEMATICA
Table[(5 - (-1)^n + 2 (-4 + (-1)^n) n + 8 n^2)/4, {n, 49}] (* or *)
Table[If[OddQ@ n, Binomial[2 n - 1, 2] + (n + 1)/2 , Binomial[2 n, 2] - (n - 2)/2], {n, 49}] (* or *)
Rest@ CoefficientList[Series[x (1 + 5 x + 4 x^2 + 5 x^3 + x^4)/((1 - x)^3 (1 + x)^2), {x, 0, 49}], x] (* Michael De Vlieger, Jul 03 2016 *)
PROG
(PARI) Vec(x*(1+5*x+4*x^2+5*x^3+x^4)/((1-x)^3*(1+x)^2) + O(x^100)) \\ Colin Barker, Jul 02 2016
(Magma) [(5-(-1)^n+2*(-4+(-1)^n)*n+8*n^2)/4 : n in [1..80]]; // Wesley Ivan Hurt, Jul 03 2016
CROSSREFS
Sequence in context: A352091 A180509 A030775 * A036833 A249670 A009242
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Jul 28 2000
STATUS
approved