OFFSET
0,2
COMMENTS
Sequence found by reading the line from 0, in the direction 0, 4,..., in the square spiral whose vertices are the generalized heptagonal numbers A085787. - Omar E. Pol, Jul 18 2012
LINKS
Ivan Panchenko, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
a(n)=20*n+a(n-1)-16 (with a(0)=0) - Vincenzo Librandi, Aug 03 2010
a(n) = A087348(n) - 1, n >= 1. - Omar E. Pol, Jul 18 2012
a(0)=0, a(1)=4, a(2)=28, a(n)=3*a(n-1)-3*a(n-2)+a(n-3). - Harvey P. Dale, Mar 19 2015
MATHEMATICA
s=0; lst={s}; Do[s+=n; AppendTo[lst, s], {n, 4, 6!, 20}]; lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2009 *)
Table[2n(5n-3), {n, 0, 40}] (* or *) LinearRecurrence[{3, -3, 1}, {0, 4, 28}, 50] (* Harvey P. Dale, Mar 19 2015 *)
PROG
(PARI) a(n)=2*n*(5*n-3) \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Omar E. Pol, Jan 02 2009
STATUS
approved