OFFSET
0,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..765
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
For n>3, a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4). - Harvey P. Dale, Aug 02 2011
G.f.: 4*( 2-x+2*x^2 ) / (x-1)^4 . - R. J. Mathar, Apr 11 2016
a(n) = 4*A229183(n+1). - R. J. Mathar, Apr 11 2016
MATHEMATICA
f[n_]:=n^3; lst={}; Do[AppendTo[lst, (f[n]+f[n+2])], {n, 0, 6!}]; lst
Array[#^3+(#+2)^3&, 40, 0] (* or *) LinearRecurrence[{4, -6, 4, -1}, {8, 28, 72, 152}, 40] (* Harvey P. Dale, Aug 02 2011 *)
PROG
(Magma) [n^3+(n+2)^3: n in [0..60]]; // Vincenzo Librandi, Apr 26 2011
(Python)
def a(n): return n**3 + (n+2)**3
print([a(n) for n in range(40)]) # Michael S. Branicky, Aug 28 2021
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Vladimir Joseph Stephan Orlovsky, Jan 03 2009
EXTENSIONS
Offset changed from 1 to 0 by Vincenzo Librandi, Apr 26 2011
STATUS
approved