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.

A137515 Maximal number of right triangles in n turns of Pythagoras's snail.

This page as a plain text file.
%I A137515 #28 May 31 2025 11:10:52
%S A137515 16,53,109,185,280,395,531,685,860,1054,1268,1502,1756,2029,2322,2635,
%T A137515 2967,3319,3691,4083,4494,4926,5376,5847,6337,6848,7377,7927,8496,
%U A137515 9086,9694,10323,10971,11639,12327,13035,13762,14509,15276,16062,16868,17694
%N A137515 Maximal number of right triangles in n turns of Pythagoras's snail.
%C A137515 Pythagoras's snail: begin the snail with an isosceles triangle (side = 1 unit). Then new triangle's right-angle sides are the previous hypotenuse and 1 unit length side.
%C A137515 From one term to the next one, the number added grows by 18, 19, 20 or 21 (tested up to 5000 terms).
%C A137515 To restate the comment immediately above: the second differences of the terms of the sequence consist of 18, 19, 20, or 21. - _Harvey P. Dale_, May 20 2019
%H A137515 Wikipedia, <a href="https://en.wikipedia.org/wiki/Spiral_of_Theodorus">Spiral of Theodorus</a>.
%F A137515 a(n) = A072895(n) - 1. - _Robert G. Wilson v_, Feb 27 2013
%e A137515 17 triangles are needed to close the first turn. So there are 16 triangles in this turn. From the beginning, there are 53 triangles before closing the second turn... etc.
%t A137515 w[n_] := ArcSin[ 1/Sqrt[n+1] ]//N; s[1] = w[1]; s[n_] := s[n] = s[n-1] + w[n]; a[n_] := (an = 1; While[ s[an] < 2*Pi*n, an++]; an-1); Table[ an = a[n]; Print[an]; an, {n, 1, 42}] (* _Jean-François Alcover_, Feb 24 2012 *)
%o A137515 (Python)
%o A137515 from math import asin, sqrt, pi
%o A137515 hyp=2
%o A137515 som=0
%o A137515 n=1
%o A137515 while n<500:
%o A137515     if som+asin(1/sqrt(hyp))/pi*180>n*360:
%o A137515         print(hyp-2, end=', ')
%o A137515         n=n+1
%o A137515     som=som+asin(1/sqrt(hyp))/pi*180
%o A137515     hyp=hyp+1
%Y A137515 Cf. A072895, A352741.
%K A137515 easy,nice,nonn
%O A137515 1,1
%A A137515 _Sébastien Dumortier_, Apr 23 2008, Apr 25 2008