A099721 a(n) = n^2*(2*n+1).
0, 3, 20, 63, 144, 275, 468, 735, 1088, 1539, 2100, 2783, 3600, 4563, 5684, 6975, 8448, 10115, 11988, 14079, 16400, 18963, 21780, 24863, 28224, 31875, 35828, 40095, 44688, 49619, 54900, 60543, 66560, 72963, 79764, 86975, 94608, 102675, 111188, 120159, 129600
Offset: 0
Links
- Vincenzo Librandi, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
Crossrefs
Programs
-
Magma
[n^2*(2*n+1): n in [0..50]]; // Vincenzo Librandi, May 01 2011
-
Maple
A099721 := proc(n) n^2*(2*n+1) ; end proc: seq(A099721(n),n=0..10) ;
-
Mathematica
a[n_]:=2*n^3+n^2; (* Vladimir Joseph Stephan Orlovsky, Dec 21 2008 *) LinearRecurrence[{4,-6,4,-1},{0,3,20,63},40] (* Harvey P. Dale, Aug 19 2022 *)
-
PARI
a(n) = ceil(sum(i=n^2-(n-1), n^2+(n-1), if(!issquare(4*i+1), (2*i+1+sqrt(4*i+1))/2, 0))); \\ Michel Marcus, Nov 14 2014, after Richard R. Forberg
Formula
G.f.: x*(3 + 8*x + x^2)/(x-1)^4.
a(n) = ceiling(Sum_{i=n^2-(n-1)..n^2+(n-1)} s(i)), for n > 0 and integer i, where s(i) are the real solutions to x = i + sqrt(x), and the summation range excludes the integer solutions which occur where i is an oblong number (A002378). The fractional portion of the summation converges to 2/3 for large n. If s(i) is replaced with i, then the summation equals n^2*(2*n-1) = A015237. - Richard R. Forberg, Oct 15 2014
From Amiram Eldar, May 17 2022: (Start)
Sum_{n>=1} 1/a(n) = Pi^2/6 + 4*log(2) - 4.
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/12 - Pi - 2*log(2) + 4. (End)
From Elmo R. Oliveira, Aug 08 2025: (Start)
E.g.f.: x*(1 + 2*x)*(3 + x)*exp(x).
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4).
Comments