OFFSET
0,2
COMMENTS
Sequence found by reading the line from 0, in the direction 0, 4, ..., in the Pythagorean spiral whose edges have length A195019 and whose vertices are the numbers A195020. The square spiral is related to the primitive Pythagorean triple [3, 4, 5]. - Omar E. Pol, Oct 13 2011
LINKS
FORMULA
a(n) = a(n-1) + 28*n - 24 (with a(0)=0). - Vincenzo Librandi, Nov 26 2010
From Colin Barker, Apr 09 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: 4*x*(1+6*x)/(1-x)^3. (End)
MATHEMATICA
s=0; lst={s}; Do[s+=n; AppendTo[lst, s], {n, 4, 8!, 28}]; lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2009 *)
4*PolygonalNumber[9, Range[0, 50]] (* Requires Mathematica version 10 or later *) (* or *) LinearRecurrence[{3, -3, 1}, {0, 4, 36}, 50] (* Harvey P. Dale, Aug 26 2019 *)
PROG
(PARI) a(n)=2*n*(7*n-5) \\ Charles R Greathouse IV, Oct 07 2015
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Dec 14 2008
STATUS
approved