OFFSET
1,1
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
EXAMPLE
73 is in the sequence because 73^2 + 1 = 5330 = 2*5*13*41 and 41 - (5+13) = 23 is prime, where 41 == 1 mod 8 and {5, 13}==5 mod 8.
MAPLE
with(numtheory):for n from 1 to 1000 do:x:=factorset(n^2+1):n1:=nops(x):s1:=0:s3:=0:for m from 1 to n1 do: if irem(x[m], 8)=1 then s1:=s1+x[m]:else if irem(x[m], 8)=5 then s3:=s3+x[m]:else fi:fi:od:x:=abs(s1-s3):if s1>0 and s3>0 and type (x, prime)=true then printf(`%d, `, n):else fi:od:
MATHEMATICA
aQ[n_] := Module[{p = FactorInteger[n^2 + 1][[;; , 1]]}, (t1 = Total[Select[p, Mod[#, 8] == 1 &]]) > 0 && (t2 = Total[Select[p, Mod[#, 8] == 5 &]]) > 0 && PrimeQ@Abs[t1 - t2]]; Select[Range[1000], aQ] (* Amiram Eldar, Sep 09 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, Aug 29 2012
STATUS
approved