A275161 Number of sides of a polygon formed by tiling n squares in a spiral.
4, 4, 6, 4, 6, 4, 6, 6, 4, 6, 6, 4, 6, 6, 6, 4, 6, 6, 6, 4, 6, 6, 6, 6, 4, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6, 6, 6, 4, 6, 6, 6, 6, 6, 6
Offset: 1
Examples
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)
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Programs
-
Mathematica
Table[If[Floor[Floor[Sqrt[4*n + 1]]^2/4] == n, 4, 6], {n, 1, 100}] (* Vaclav Kotesovec, Dec 02 2021 *)
-
PARI
a(n)=if(sqrtint(4*n+1)^2\4==n, 4, 6) \\ Charles R Greathouse IV, Nov 20 2016
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
Comments