A254874 a(n) = floor((10*n^3 + 63*n^2 + 126*n + 89) / 72).
1, 4, 9, 18, 31, 49, 73, 104, 142, 189, 245, 311, 388, 477, 578, 693, 822, 966, 1126, 1303, 1497, 1710, 1942, 2194, 2467, 2762, 3079, 3420, 3785, 4175, 4591, 5034, 5504, 6003, 6531, 7089, 7678, 8299, 8952, 9639, 10360, 11116, 11908, 12737, 13603, 14508, 15452
Offset: 0
Examples
G.f. = 1 + 4*x + 9*x^2 + 18*x^3 + 31*x^4 + 49*x^5 + 73*x^6 + 104*x^7 + ...
Links
- G. C. Greubel, Table of n, a(n) for n = 0..2500
- Index entries for linear recurrences with constant coefficients, signature (2,0,-1,-1,0,2,-1).
Crossrefs
Cf. A254875.
Programs
-
Magma
[Floor((10*n^3 +63*n^2 +126*n +89)/72): n in [0..50]]; // G. C. Greubel, Aug 03 2018
-
Mathematica
a[ n_] := Quotient[ 10 n^3 + 63 n^2 + 126 n + 89, 72]; Table[Floor[(10*n^3 +63*n^2 +126*n +89)/72], {n,0,50}] (* G. C. Greubel, Aug 03 2018 *)
-
PARI
{a(n) = (10*n^3 + 63*n^2 + 126*n + 89) \ 72};
-
PARI
{a(n) = polcoeff( (-1)^(n<0) * (if( n<0, n = -4 - n; x^2, x) + 1 + x + x^2 + x^3) / ((1 - x)^2 * (1 - x^2) * (1 - x^ 3)) + x * O(x^n), n)};
Formula
G.f.: (1 + 2*x + x^2 + x^3) / ((1 - x)^2 * (1 - x^2) * (1 - x^3)).
a(n) - 2*a(n+1) + 2*a(n+3) - a(n+4) = -1 if n == 1 (mod 3) else -2 for all n in Z.
a(n) = -A254875(-4-n) for all n in Z.