A235598 Begin with a(0) = 3. Let a(n) for n > 0 be the smallest positive integer not yet in the sequence which forms part of a Pythagorean triple when paired with a(n-1).
3, 4, 5, 12, 9, 15, 8, 6, 10, 24, 7, 25, 20, 16, 30, 18, 80, 39, 36, 27, 45, 28, 21, 29, 420, 65, 33, 44, 55, 48, 14, 50, 40, 32, 60, 11, 61, 1860, 341, 541, 146340, 15447, 20596, 25745, 32208, 2540, 1524, 635, 381, 508, 16125, 4515, 936, 75, 72, 54, 90, 56
Offset: 0
Links
- Robert G. Wilson v, Table of n, a(n) for n = 0..10000
- J. Cooper and C. Poirel, Note on the Pythagorean Triple System
Programs
-
Mathematica
f[s_List] := Block[{n = s[[-1]]}, sol = Solve[ x^2 + y^2 == z^2 && x > 0 && y > 0 && z > 0 && (x == n || z == n), {x, y, z}, Integers]; Append[s, Min[ Complement[ Union[ Extract[sol, Position[ sol, Integer]]], s]]]]; lst = Nest[f, {3}, 250] (* _Robert G. Wilson v, Jan 17 2014 *)
Comments