cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A275161 Number of sides of a polygon formed by tiling n squares in a spiral.

This page as a plain text file.
%I A275161 #35 Dec 02 2021 08:31:57
%S A275161 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,
%T A275161 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,
%U A275161 6,6,6,4,6,6,6,6,6,6,6,6,4,6,6,6,6,6,6
%N A275161 Number of sides of a polygon formed by tiling n squares in a spiral.
%H A275161 Antti Karttunen, <a href="/A275161/b275161.txt">Table of n, a(n) for n = 1..20000</a>
%F A275161 a(n) = 4 for n in A002620, 6 otherwise. - _Jon E. Schoenfield_, Nov 19 2016
%F A275161 a(n) = 6 - 2*A240025(n). [See above] - _Antti Karttunen_, Nov 30 2021
%e A275161 From _Jon E. Schoenfield_, Nov 20 2016: (Start)
%e A275161 The order in which tiles are added to the spiral follows the numbering in the figure below:
%e A275161 .
%e A275161   +----+----+----+----+----+
%e A275161   | 25 | 10 | 11 | 12 | 13 |
%e A275161   +----+----+----+----+----+
%e A275161   | 24 |  9 |  2 |  3 | 14 |
%e A275161   +----+----+----+----+----+
%e A275161   | 23 |  8 |  1 |  4 | 15 |
%e A275161   +----+----+----+----+----+
%e A275161   | 22 |  7 |  6 |  5 | 16 |
%e A275161   +----+----+----+----+----+
%e A275161   | 21 | 20 | 19 | 18 | 17 |
%e A275161   +----+----+----+----+----+
%e A275161 (End)
%t A275161 Table[If[Floor[Floor[Sqrt[4*n + 1]]^2/4] == n, 4, 6], {n, 1, 100}] (* _Vaclav Kotesovec_, Dec 02 2021 *)
%o A275161 (PARI) a(n)=if(sqrtint(4*n+1)^2\4==n, 4, 6) \\ _Charles R Greathouse IV_, Nov 20 2016
%Y A275161 Cf. A002620, A240025.
%K A275161 nonn,easy
%O A275161 1,1
%A A275161 _Eric Ginsburg_, Nov 13 2016