OFFSET
0,2
COMMENTS
Write 0,1,2,... in a clockwise spiral; sequence gives the numbers that fall on the positive y-axis. (See Example section.)
Central terms of the triangle in A126890. - Reinhard Zumkeller, Dec 30 2006
a(n)*Pi is the total length of 4 points circle center spiral after n rotations. The spiral length at each rotation (L(n)) is A004770. The spiral length ratio rounded down [floor(L(n)/L(1))] is A047497. See illustration in links. - Kival Ngaokrajang, Dec 27 2013
For n >= 1, the continued fraction expansion of sqrt(a(n)) is [2n; {4, 4n}]. For n=1, this collapses to [2, {4}]. - Magus K. Chu, Sep 15 2022
REFERENCES
S. M. Ellerstein, The square spiral, J. Recreational Mathematics 29 (#3, 1998) 188; 30 (#4, 1999-2000), 246-250.
R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 2nd ed., 1994, p. 99.
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..10000
Emilio Apricena, A version of the Ulam spiral
Robert FERREOL, Illustration by pentagons
Kival Ngaokrajang, Illustration of 4 points circle center spiral
Leo Tavares, Illustration: Triangular Layers
G. Thimm, Emails to N. J. A. Sloane, Sep. 1994
Index entries for linear recurrences with constant coefficients, signature (3,-3,1).
FORMULA
G.f.: x*(5+3*x)/(1-x)^3. - Michael Somos, Mar 03 2003
a(n) = floor((n + 1/4)^2). - Reinhard Zumkeller, Feb 20 2010
a(n) = 8*n + a(n-1) - 3. - Vincenzo Librandi, Nov 21 2010
Sum_{n>=1} 1/a(n) = Sum_{k>=0} (-1)^k*zeta(2+k)/4^(k+1) = 0.349762131... . - R. J. Mathar, Jul 10 2012
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3) for n>2, a(0)=0, a(1)=5, a(2)=18. - Philippe Deléham, Mar 26 2013
a(n) = A118729(8n+4). - Philippe Deléham, Mar 26 2013
E.g.f.: (4*x^2 + 5*x)*exp(x). - G. C. Greubel, Jul 17 2017
From Amiram Eldar, Jul 03 2020: (Start)
Sum_{n>=1} 1/a(n) = 4 - Pi/2 - 3*log(2).
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/sqrt(2) + log(2) + sqrt(2)*log(1 + sqrt(2)) - 4. (End)
EXAMPLE
Part of the spiral:
.
64--65--66--67--68
|
63 36--37--38--39--40--41--42
| | |
62 35 16--17--18--19--20 43
| | | | |
61 34 15 4---5---6 21 44
| | | | | | |
60 33 14 3 0 7 22 45
| | | | | | | |
59 32 13 2---1 8 23 46
| | | | | |
58 31 12--11--10---9 24 47
| | | |
57 30--29--28--27--26--25 48
| |
56--55--54--53--52--51--50--49
MATHEMATICA
LinearRecurrence[{3, -3, 1}, {0, 5, 18}, 50] (* Vincenzo Librandi, Jan 29 2012 *)
Table[n(4n+1), {n, 0, 50}] (* Harvey P. Dale, Aug 10 2017 *)
PROG
(PARI) a(n)=4*n^2+n
(Magma) I:=[0, 5, 18]; [n le 3 select I[n] else 3*Self(n-1)-3*Self(n-2)+1*Self(n-3): n in [1..50]]; // Vincenzo Librandi, Jan 29 2012
CROSSREFS
Sequences from spirals: A001107, A002939, A007742, A033951, A033952, A033953, A033954, A033989, A033990, A033991, A002943, A033996, A033988.
Sequences on the four axes of the square spiral: Starting at 0: A001107, A033991, A007742, A033954; starting at 1: A054552, A054556, A054567, A033951.
Sequences on the four diagonals of the square spiral: Starting at 0: A002939 = 2*A000384, A016742 = 4*A000290, A002943 = 2*A014105, A033996 = 8*A000217; starting at 1: A054554, A053755, A054569, A016754.
Sequences obtained by reading alternate terms on the X and Y axes and the two main diagonals of the square spiral: Starting at 0: A035608, A156859, A002378 = 2*A000217, A137932 = 4*A002620; starting at 1: A317186, A267682, A002061, A080335.
Cf. index to sequences with numbers of the form n*(d*n+10-d)/2 in A140090.
Cf. A081266.
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved