login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Prime numbers that are the sum of an odd square s and an even square t such that 0 < s < t.
0

%I #8 Aug 02 2024 16:43:31

%S 5,17,37,61,73,89,101,109,113,149,181,193,197,257,277,281,317,337,349,

%T 373,401,409,449,509,521,569,577,601,613,653,677,701,709,757,761,773,

%U 797,809,937,953,1009,1021,1033,1049,1069,1117,1181,1193,1237,1249,1277,1297,1301

%N Prime numbers that are the sum of an odd square s and an even square t such that 0 < s < t.

%e 17 is in the sequence since it is a prime such that 1^2 + 4^2 = 1 + 16 = 17, where 1 is odd, 16 is even, and 0 < 1 < 16.

%t Table[If[(PrimePi[n] - PrimePi[n - 1])*Sum[Mod[i, 2] Mod[n - i + 1, 2] (Floor[Sqrt[i]] - Floor[Sqrt[i - 1]]) (Floor[Sqrt[n - i]] - Floor[Sqrt[n - i - 1]]), {i, Floor[n/2]}] > 0, n, {}], {n, 1200}] // Flatten

%t osesQ[p_]:=Module[{s=Select[IntegerPartitions[p,{2}],AllTrue[Sqrt[#],IntegerQ]&]},OddQ[ Min[s]] && EvenQ[Max[s]]]; Select[Prime[Range[250]],osesQ] (* _Harvey P. Dale_, Aug 02 2024 *)

%Y Cf. A010051, A010052.

%K nonn

%O 1,1

%A _Wesley Ivan Hurt_, Dec 25 2020