OFFSET
1,2
COMMENTS
Sequence found by reading the line from 1, in the direction 1, 19, ..., in the square spiral whose vertices are the triangular numbers A000217.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: x*(-1 - 16*x + x^2) / (x-1)^3. - R. J. Mathar, Sep 06 2011
MATHEMATICA
Table[8n^2-6n-1, {n, 50}] (* or *) LinearRecurrence[{3, -3, 1}, {1, 19, 53}, 50] (* Harvey P. Dale, May 29 2021 *)
PROG
(Magma) [8*n^2 - 6*n - 1: n in [1..50]]; // Vincenzo Librandi, Sep 07 2011
(PARI) a(n)=8*n^2-6*n-1 \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Sep 05 2011
STATUS
approved