A275708 a(1)=1, a(2)=2; thereafter a(n) is the smallest positive integer not yet used such that a(n)+a(n-1)-a(n-2) is a square.
1, 2, 3, 8, 4, 5, 15, 6, 10, 12, 7, 9, 14, 11, 19, 17, 18, 24, 30, 43, 23, 21, 27, 58, 33, 26, 16, 35, 45, 39, 22, 42, 29, 38, 40, 34, 31, 28, 52, 25, 36, 53, 32, 37, 20, 66, 54, 13, 50, 44, 55, 70, 49, 46, 67
Offset: 1
Keywords
Examples
-1+2+3=4, -2+3+8=9, -3+8+4=9.
Crossrefs
Cf. A076991.
Programs
-
Mathematica
s={1,2};Do[a = s[[-1]] - s[[-2]]; k = 1; While[(b=k^2-a)<=0 || MemberQ[s,b], k++]; AppendTo[s, k^2 - a], {100}]; s
Comments