OFFSET
1,1
COMMENTS
Diagonal of a number spiral.
LINKS
FORMULA
a(n) = 4*A002061(n). - Robert G. Wilson v, Nov 29 2005
a(n) = 8*n + a(n-1) - 8 (with a(1)=4). - Vincenzo Librandi, Nov 13 2010
Sum_{n>=1} 1/a(n) = tanh(Pi*sqrt(3)/2)*Pi/(4*sqrt(3)). - Amiram Eldar, Aug 25 2022
EXAMPLE
..43.44.45.46.47.48.49.50...
..42.21.22.23.24.25.26.51...
..40.19..7..8..9.10.27.52...
..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
MATHEMATICA
Table[4(n^2 - n + 1), {n, 2, 47}] (* Robert G. Wilson v, Nov 29 2005 *)
PROG
(Maxima) makelist(4*n^2 - 4*n + 4, n, 1, 55); /* Martin Ettl, Oct 16 2012 */
(PARI) a(n)=4*(n^2-n+1) \\ Charles R Greathouse IV, Jun 17 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jenny X. Chen (pookahead(AT)gmail.com), Nov 28 2005
EXTENSIONS
Edited and extended by Robert G. Wilson v, Nov 29 2005
STATUS
approved