OFFSET
1,1
COMMENTS
Sequence found by reading the line from 5, in the direction 5, 29, ..., in the square spiral whose vertices are the generalized heptagonal numbers A085787. - Omar E. Pol, Jul 18 2012
LINKS
Shawn A. Broyles, Table of n, a(n) for n = 1..10000
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
From Colin Barker, Jun 30 2012: (Start)
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: x*(5 + 14*x + x^2)/(1-x)^3. (End)
a(n) = 1 + A153784(n). - Omar E. Pol, Jul 18 2012
E.g.f.: exp(x)*(10*x^2 + 4*x + 1) - 1. - Elmo R. Oliveira, Oct 31 2024
EXAMPLE
a(3)=73 since 73^2 = 48^2 + 55^2 = (4*12)^2 + (48 + 7)^2. See 1st formula.
MATHEMATICA
Table[10*n^2 - 6*n + 1, {n, 50}] (* Paolo Xausa, Jul 18 2024 *)
PROG
(PARI) a(n)=10*n^2-6*n+1 \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy,changed
AUTHOR
Charlie Marion, Oct 20 2003
EXTENSIONS
More terms from Ray Chandler, Oct 22 2003
STATUS
approved