login
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.
0

%I #8 Aug 08 2016 22:18:22

%S 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,

%T 16,35,45,39,22,42,29,38,40,34,31,28,52,25,36,53,32,37,20,66,54,13,50,

%U 44,55,70,49,46,67

%N 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.

%C Apparently this is a permutation of positive numbers. Out of the first 10000 terms the missing numbers are:

%C 8974, 9298, 9342, 9380, 9386, 9425, 9429, 9454, 9495, 9497, 9525,...,

%C while the maximal term is a(9919)=10802.

%C Corresponding squares:

%C 4, 9, 9, 1, 16, 16, 1, 16, 9, 4, 16, 16, 16, 25, 16, 25, 36, 49, 36, 1, 25, 64, 64, 1, ...

%e -1+2+3=4, -2+3+8=9, -3+8+4=9.

%t 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

%Y Cf. A076991.

%K nonn

%O 1,2

%A _Zak Seidov_, Aug 06 2016