|
|
A335329
|
|
Primes p of the form 4k+1 such that the sum up to p of the primes of the same form is a square.
|
|
0
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
5+13+17+29 = 64 = 8^2.
5+...+161409881 = 354203842652416 = 18820304^2.
|
|
MATHEMATICA
|
s=0; Select[Prime@ Range[10^9], Mod[#, 4]==1 && IntegerQ@ Sqrt[s+=#] &] (* Robert Price, Sep 10 2020 *)
|
|
PROG
|
(UBASIC)
10 'S1=sum of primes 4k+1, S1=sum of primes 4k+1
20 'is S1 a square?
30 S1=0:P=2:PM=2^32-10:K=1
40 P=nxtprm(P):K=K+1:if P>PM then end
50 if P@4=3 then goto 40
60 S1=S1+P:SS1=isqrt(S1)
70 if SS1*SS1=S1 then print K; P; S1; SS1; 1
80 goto 40
(PARI) s=0; forprime(p=5, 10^9, if(p%4==1, s+=p; if(issquare(s), print1(p, ", ")))) \\ Hugo Pfoertner, Jun 02 2020
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|