OFFSET
0,1
COMMENTS
Natural numbers A000027 written clockwise as a square spiral:
.
43--44--45--46--47--48--49
|
42 21--22--23--24--25--26
| | |
41 20 7---8---9--10 27
| | | | |
40 19 6 1---2 11 28
| | | | | |
39 18 5---4---3 12 29
| | | |
38 17--16--15--14--13 30
| |
37--36--35--34--33--32--31
.
Walking in straight lines away from the center:
1, 2, 11, ... = A054552(n) = 1 -3*n+4*n^2,
1, 8, 23, ... = A033951(n) = 1 +3*n+4*n^2,
1, 3, 13, ... = A054554(n+1) = 1 -2*n-4*n^2,
1, 7, 21, ... = A054559(n+1) = 1 +2*n+4*n^2,
1, 4, 15, ... = A054556(n+1) = 1 -n+4*n^2,
1, 6, 19, ... = A054567(n+1) = 1 +n+4*n^2,
1, 5, 17, ... = A053755(n) = 1 +4*n^2,
1, 9, 25, ... = A016754(n) = 1 +4*n+4*n^2 = (1+2*n)^2,
2, 8, 22, ... = 2*A084849(n) = 2 +2*n+4*n^2,
2, 12, 30, ... = A002939(n+1) = 2 +6*n+4*n^2,
2, 9, 24, ... = a(n) = 2 +3*n+4*n^2,
2, 10, 26, ... = A069894(n) = 2 +4*n+4*n^2,
3, 11, 27, ... = A164897(n) = 3 +4*n+4*n^2,
3, 12, 29, ... = A054552(n+1)+1 = 3 +5*n+4*n^2,
3, 14, 33, ... = A033991(n+1) = 3 +7*n+4*n^2,
3, 15, 35, ... = A000466(n+1) = 3 +8*n+4*n^2,
4, 14, 32, ... = 2*A130883(n+1) = 4 +6*n+4*n^2,
4, 16, 36, ... = A016742(n+1) = 4 +8*n+4*n^2 = (2+2*n)^2,
5, 18, 39, ... = A007742(n+1) = 5 +9*n+4*n^2,
5, 19, 41, ... = A125202(n+2) = 5+10*n+4*n^2.
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) = a(n-1) + 8*n - 1.
a(n) = 2*a(n-1) - a(n-2) + 8.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
G.f.: (2 +3*x +3*x^2)/(1-x)^3 . - R. J. Mathar, Feb 11 2011
a(n) = A033954(n) + 2. - Bruno Berselli, Apr 10 2011
E.g.f.: (4*x^2 + 7*x + 2)*exp(x). - G. C. Greubel, Jul 09 2017
MATHEMATICA
Table[4n^2 + 3n + 2, {n, 0, 50}] (* G. C. Greubel, Jul 09 2017 *)
LinearRecurrence[{3, -3, 1}, {2, 9, 24}, 60] (* Harvey P. Dale, Aug 11 2021 *)
PROG
(Magma) [2+3*n+4*n^2: n in [0..80]]; // Vincenzo Librandi, Feb 09 2011
(PARI) a(n)=4*n^2+3*n+2 \\ Charles R Greathouse IV, Apr 14 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Feb 09 2011
STATUS
approved