OFFSET
0,2
COMMENTS
Sequence found by reading the line from 1, in the direction 1, 16,..., in the square spiral whose vertices are the triangular numbers A000217.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(0)=1, a(1)=16, a(2)=47, a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3). - Harvey P. Dale, Apr 06 2014
From Elmo R. Oliveira, Oct 22 2024: (Start)
G.f.: (1 + 13*x + 2*x^2)/(1 - x)^3.
E.g.f.: (1 + 15*x + 8*x^2)*exp(x). (End)
MAPLE
MATHEMATICA
Table[8n^2+7n+1, {n, 0, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {1, 16, 47}, 50] (* Harvey P. Dale, Apr 06 2014 *)
PROG
(Magma) [8*n^2 +7*n + 1: n in [0..50]]; // Vincenzo Librandi, Sep 07 2011
(PARI) a(n)=8*n^2+7*n+1 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 05 2011
STATUS
approved