login
a(n) = floor((10*n^3 + 63*n^2 + 126*n + 89) / 72).
3

%I #15 Sep 08 2022 08:46:11

%S 1,4,9,18,31,49,73,104,142,189,245,311,388,477,578,693,822,966,1126,

%T 1303,1497,1710,1942,2194,2467,2762,3079,3420,3785,4175,4591,5034,

%U 5504,6003,6531,7089,7678,8299,8952,9639,10360,11116,11908,12737,13603,14508,15452

%N a(n) = floor((10*n^3 + 63*n^2 + 126*n + 89) / 72).

%H G. C. Greubel, <a href="/A254874/b254874.txt">Table of n, a(n) for n = 0..2500</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (2,0,-1,-1,0,2,-1).

%F G.f.: (1 + 2*x + x^2 + x^3) / ((1 - x)^2 * (1 - x^2) * (1 - x^3)).

%F 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.

%F a(n) = -A254875(-4-n) for all n in Z.

%e G.f. = 1 + 4*x + 9*x^2 + 18*x^3 + 31*x^4 + 49*x^5 + 73*x^6 + 104*x^7 + ...

%t a[ n_] := Quotient[ 10 n^3 + 63 n^2 + 126 n + 89, 72];

%t Table[Floor[(10*n^3 +63*n^2 +126*n +89)/72], {n,0,50}] (* _G. C. Greubel_, Aug 03 2018 *)

%o (PARI) {a(n) = (10*n^3 + 63*n^2 + 126*n + 89) \ 72};

%o (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)};

%o (Magma) [Floor((10*n^3 +63*n^2 +126*n +89)/72): n in [0..50]]; // _G. C. Greubel_, Aug 03 2018

%Y Cf. A254875.

%K nonn,easy

%O 0,2

%A _Michael Somos_, Feb 09 2015