A137515 Maximal number of right triangles in n turns of Pythagoras's snail.
16, 53, 109, 185, 280, 395, 531, 685, 860, 1054, 1268, 1502, 1756, 2029, 2322, 2635, 2967, 3319, 3691, 4083, 4494, 4926, 5376, 5847, 6337, 6848, 7377, 7927, 8496, 9086, 9694, 10323, 10971, 11639, 12327, 13035, 13762, 14509, 15276, 16062, 16868, 17694
Offset: 1
Examples
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.
Links
- Wikipedia, Spiral of Theodorus.
Programs
-
Mathematica
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 *)
-
Python
from math import asin, sqrt, pi hyp=2 som=0 n=1 while n<500: if som+asin(1/sqrt(hyp))/pi*180>n*360: print(hyp-2, end=', ') n=n+1 som=som+asin(1/sqrt(hyp))/pi*180 hyp=hyp+1
Formula
a(n) = A072895(n) - 1. - Robert G. Wilson v, Feb 27 2013
Comments