A276382 a(1) = 1, and a(n) = a(n-1) + floor(3*n/2) + 1 for n >= 2.
1, 5, 10, 17, 25, 35, 46, 59, 73, 89, 106, 125, 145, 167, 190, 215, 241, 269, 298, 329, 361, 395, 430, 467, 505, 545, 586, 629, 673, 719, 766, 815, 865, 917, 970, 1025, 1081, 1139, 1198, 1259, 1321, 1385, 1450, 1517, 1585, 1655, 1726, 1799, 1873, 1949, 2026
Offset: 1
Examples
a(2)=5; the 5 prime signatures / partitions are: {3,1,1,1}, {2,2,2}, {2,2,1,1}, {2,1,1,1} and {1,1,1,1,1,1}. G.f. = x + 5*x^2 + 10*x^3 + 17*x^4 + 25*x^5 + 35*x^6 + 46*x^7 + ... - _Michael Somos_, Sep 08 2023
Links
- Colin Barker, Table of n, a(n) for n = 1..1000
- Index entries for linear recurrences with constant coefficients, signature (2,0,-2,1).
Crossrefs
Programs
-
Magma
[((-1)^n+12*n+6*n^2-9)/8: n in [1..60]]; // Vincenzo Librandi, Sep 10 2016
-
Mathematica
a[1] = 1; a[n_] := a[n] = a[n - 1] + Floor[3 n/2] + 1 ; Array[a, 51] (* Michael De Vlieger, Sep 01 2016 *) a[n_] := Floor[(3*(n+1)^2 - 7)/4]; (* Michael Somos, Sep 08 2023 *)
-
PARI
Vec(x*(1+3*x-x^3)/((1-x)^3*(1+x)) + O(x^60)) \\ Colin Barker, Sep 01 2016
-
PARI
{a(n) = (3*(n+1)^2 - 7)\4}; /* Michael Somos, Sep 09 2023 */
Formula
From Colin Barker, Sep 01 2016: (Start)
a(n) = ((-1)^n + 12*n + 6*n^2 - 9)/8 for n > 0.
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4) for n > 4.
G.f.: x*(1 + 3*x - x^3) / ((1-x)^3*(1+x)). (End)
a(n) = -1 + Sum_{k=1..n} floor((n+k+3)/2). - Wesley Ivan Hurt, Apr 01 2017
a(n) = a(-2-n) for all n in Z. - Michael Somos, Sep 08 2023
a(n) = floor((3*(n+1)^2 - 7)/4). - Michael Somos, Sep 09 2023
Comments