login
Primes that can be expressed as the sum of a prime and twice a positive square.
0

%I #26 Aug 16 2024 20:49:15

%S 5,7,11,13,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,

%T 103,107,109,113,127,131,139,149,151,157,163,167,173,179,181,191,193,

%U 197,199,211,223,229,233,239,241,251,257,263,269,271,277,281,283,293,307

%N Primes that can be expressed as the sum of a prime and twice a positive square.

%D Albert H. Beiler, Recreations in the theory of numbers, New York, Dover, (2nd ed.) 1966. See p. 226.

%e 23 is a term since it equals 5 + 2*3^2.

%t a={}; For[i=1, i<=63, i++,For[j=1, (d=Prime[i]-2j^2)>0, j++,If[PrimeQ[d]&&!MemberQ[a,Prime[i]],AppendTo[a,Prime[i]]]]]; a

%Y Complement of A042978 in A000040.

%Y Cf. A001105.

%K nonn

%O 1,1

%A _Stefano Spezia_, Aug 16 2024