OFFSET
1,1
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..20000
FORMULA
a(n) = 4 for n in A002620, 6 otherwise. - Jon E. Schoenfield, Nov 19 2016
a(n) = 6 - 2*A240025(n). [See above] - Antti Karttunen, Nov 30 2021
EXAMPLE
From Jon E. Schoenfield, Nov 20 2016: (Start)
The order in which tiles are added to the spiral follows the numbering in the figure below:
.
+----+----+----+----+----+
| 25 | 10 | 11 | 12 | 13 |
+----+----+----+----+----+
| 24 | 9 | 2 | 3 | 14 |
+----+----+----+----+----+
| 23 | 8 | 1 | 4 | 15 |
+----+----+----+----+----+
| 22 | 7 | 6 | 5 | 16 |
+----+----+----+----+----+
| 21 | 20 | 19 | 18 | 17 |
+----+----+----+----+----+
(End)
MATHEMATICA
Table[If[Floor[Floor[Sqrt[4*n + 1]]^2/4] == n, 4, 6], {n, 1, 100}] (* Vaclav Kotesovec, Dec 02 2021 *)
PROG
(PARI) a(n)=if(sqrtint(4*n+1)^2\4==n, 4, 6) \\ Charles R Greathouse IV, Nov 20 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Eric Ginsburg, Nov 13 2016
STATUS
approved