OFFSET
1,1
COMMENTS
The primes in the sequence are 173, 1237, 1277, 2971, 5333, 8363, 19387, 20773, ...
The corresponding squares p+q+r+s are 121, 289, 441, 289, 529, 9025, 841, 5625, 529, 196, 5476, 3025, ...
EXAMPLE
173 is in the sequence because 173^2 + 1 = 2*5*41*73 and 2 + 5 + 41 + 73 = 11^2.
MAPLE
with(numtheory):
for n from 1 to 20000 do:
y:=factorset(n^2+1):n0:=nops(y):
if n0=4 and bigomega(n^2+1)=4 and
sqrt(y[1]+y[2]+y[3]+y[4])=floor(sqrt(y[1]+y[2]+y[3]+y[4]))
then
printf(`%d, `, n):
else
fi:
od:
PROG
(PARI) isok(n) = my(f = factor(n^2+1)); (#f~== 4) && (vecmax(f[, 2]) == 1) && issquare(vecsum(f[, 1])) ; \\ Michel Marcus, Aug 24 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 24 2015
STATUS
approved