OFFSET
0,2
COMMENTS
Let f(x) = x^2 + x + 1 then sequence gives f(f(n+1)) - f(f(n)), n >= 0.
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
M. O'Keeffe, Coordination sequences for lattices, Zeit. f. Krist., 210 (1995), 905-908.
M. O'Keeffe, Coordination sequences for lattices, Zeit. f. Krist., 210 (1995), 905-908. [Annotated scanned copy]
Index entries for linear recurrences with constant coefficients, signature (4,-6,4,-1).
FORMULA
a(n) = 4*n^3 + 6*n, n >= 1.
a(n) = 4*a(n-1) - 6*a(n-2) + 4*a(n-3) - a(n-4) for n>4. - Colin Barker, Mar 03 2015
G.f.: (1+x)^2*(1+4*x+x^2)/(1-x)^4. - Colin Barker, Mar 03 2015
a(0) = 1; for n > 0, a(n) = A005898(n-1) + A005898(n) = (n-1)^3 + 2n^3 + (n+1)^3. - Doug Bell, Aug 18 2015
E.g.f.: 1 + 2*x*(5 + 6*x + 2*x^2)*exp(x). - G. C. Greubel, Aug 21 2015
MAPLE
1, seq( 4*k^3+6*k, k=1..40);
MATHEMATICA
Table[If[n==0, 1, 2*n*(3+2*n^2)], {n, 0, 40}] (* G. C. Greubel, Nov 10 2019 *)
PROG
(PARI) Vec((x+1)^2*(x^2+4*x+1)/(x-1)^4 + O(x^40)) \\ Colin Barker, Mar 03 2015
(PARI) vector(46, n, if(n==1, 1, 2*(n-1)*(3 +2*(n-1)^2) ) ) \\ G. C. Greubel, Nov 10 2019
(Magma) [1] cat [2*n*(3+2*n^2): n in [1..45]]; // G. C. Greubel, Nov 10 2019
(Sage) [1]+[2*n*(3+2*n^2) for n in (1..45)]; # G. C. Greubel, Nov 10 2019
(GAP) Concatenation([1], List([1..45], n-> 2*n*(3+2*n^2) )); # G. C. Greubel, Nov 10 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
STATUS
approved