%I M5312 #41 Sep 08 2022 08:44:34
%S 1,56,311,920,2037,3816,6411,9976,14665,20632,28031,37016,47741,60360,
%T 75027,91896,111121,132856,157255,184472,214661,247976,284571,324600,
%U 368217,415576,466831,522136,581645,645512,713891,786936,864801,947640,1035607,1128856
%N Truncated cube numbers.
%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H Reinhard Zumkeller, <a href="/A005912/b005912.txt">Table of n, a(n) for n = 0..10000</a>
%H Simon Plouffe, <a href="https://arxiv.org/abs/0911.4975">Approximations de séries génératrices et quelques conjectures</a>, Dissertation, Université du Québec à Montréal, 1992; arXiv:0911.4975 [math.NT], 2009.
%H Simon Plouffe, <a href="/A000051/a000051_2.pdf">1031 Generating Functions</a>, Appendix to Thesis, Montreal, 1992
%H B. K. Teo and N. J. A. Sloane, <a href="http://dx.doi.org/10.1021/ic00220a025">Magic numbers in polygonal and polyhedral clusters</a>, Inorgan. Chem. 24 (1985), 4545-4558.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4, -6, 4, -1).
%F a(n) = (3*n+1)^3 - 8*(n)*(n+1)*(n+2)/6 = (77/3)*n^3 + 23*n^2 + (19/3)*n + 1.
%F a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4); a(0)=1, a(1)=56, a(2)=311, a(3)=920. - _Harvey P. Dale_, Aug 14 2011
%p A005912:=(1+52*z+93*z**2+8*z**3)/(z-1)**4; # conjectured by _Simon Plouffe_ in his 1992 dissertation
%t Table[(3n+1)^3-8(n)(n+1)(n+2)/6,{n,0,30}] (* or *) LinearRecurrence[ {4,-6,4,-1},{1,56,311,920},30] (* _Harvey P. Dale_, Aug 14 2011 *)
%o (Haskell)
%o a005912 n = (n * (n * (77 * n + 69) + 19) + 3) `div` 3 :: Integer
%o -- _Reinhard Zumkeller_, Aug 09 2014
%o (Magma) [(3*n+1)^3-8*(n)*(n+1)*(n+2)/6: n in [0..40]] // _Vincenzo Librandi_, Aug 09 2014
%o (PARI) a(n)=(3*n+1)^3-8*(n)*(n+1)*(n+2)/6 \\ _Charles R Greathouse IV_, Feb 10 2017
%K nonn,easy,nice
%O 0,2
%A _N. J. A. Sloane_
%E More terms from Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Dec 22 1999