OFFSET
1,1
COMMENTS
For a(1) = 0,1,2 no possible value of a(2) exists; for a(1) = 3,4 we get 4, 3 for a(2) but no further possible values. For a(1) >= 5 do we always get an infinite sequence?
From Robert Israel, Nov 22 2017: (Start)
Yes: if t >= 5 is the largest of a(1),...,a(n), then (if no smaller k works) it is always possible to take a(n+1) = (t^2-1)/2 if t is odd, t^2/4 - 1 if t is even.
Does the sequence include every number >= 5? (End)
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 30 because a(5)^2 + a(4)^2 = 30^2 + 16^2 = 34^2; a(6) = 35 because a(6)^2 + a(2)^2 = 35^2 + 12^2 = 37^2.
MAPLE
Cands:= {5}: S:= {}:
for n from 1 to 100 do
A[n]:= min(Cands);
Cands:= Cands minus {A[n]};
if A[n]::odd then divs:= select(`<`, numtheory:-divisors(A[n]^2), A[n])
else divs:= select(t -> t < A[n] and t::even and (A[n]^2/t)::even, numtheory:-divisors(A[n]^2))
fi;
Cands := Cands union (map(t -> (A[n]^2/t - t)/2, divs) minus S);
S:= S union {A[n]};
od:
seq(A[i], i=1..100); # Robert Israel, Nov 22 2017
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Jonathan Ayres (jonathan.ayres(AT)ntlworld.com), Dec 15 2001
EXTENSIONS
New name from Robert Israel, Nov 22 2017
STATUS
approved