OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
The primitive Pythagorean triple (39, 80, 89) has all its terms in A009003, and 89 is not divisible by any previous term. Hence 89 is in sequence.
MAPLE
ishyp:= proc(n) local s; ormap(s -> s mod 4 = 1, numtheory:-factorset(n)) end proc:
filter:= proc(n) local s;
ormap(s -> ishyp(subs(s, x)) and ishyp(subs(s, y)), [isolve(x^2+y^2=n^2)])
end proc:
R:= []: count:= 0:
for n from 1 while count < 100 do
if ormap(t -> n mod t = 0, R) then next fi;
if filter(n) then R:= [op(R), n]; count:= count+1; fi
od:
R; # Robert Israel, Jan 10 2023
MATHEMATICA
ishyp[n_] := AnyTrue[ FactorInteger[n][[All, 1]], Mod[#, 4] == 1 &] ;
filter[n_] := AnyTrue[Solve[x^2 + y^2 == n^2, Integers], ishyp[x /. #] && ishyp[y /. #] &];
R = {}; count = 0;
For[n = 1, count < 100, n++, If[AllTrue[R, Mod[n, #] != 0&], If[filter[n], AppendTo[R, n]; count++]]];
R (* Jean-François Alcover, May 11 2023, after Robert Israel *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Lamine Ngom, May 24 2022
EXTENSIONS
Corrected by Robert Israel, Jan 10 2023
STATUS
approved