cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A057029 Central column of arrays in A057027 and A057028.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Jul 28 2000

Keywords

Crossrefs

Programs

  • Magma
    [(5-(-1)^n+2*(-4+(-1)^n)*n+8*n^2)/4 : n in [1..80]]; // Wesley Ivan Hurt, Jul 03 2016
  • 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 *)
  • 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
    

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