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”).
%I #18 May 23 2023 07:25:34
%S 60,68,110,111,120,136,143,156,164,174,180,193,204,215,220,222,226,
%T 240,272,274,286,292,300,312,318,327,328,330,333,335,337,340,348,356,
%U 360,374,380,385,386,388,407,408,420,429,430,440,444,452,457,466,468,476,480,492,522,540,544,548,550,551,555,559,562,572,579,584
%N Numbers whose squares can be written in all the four forms a^2 + b^2, a^2 + 2*b^2, a^2 + 3*b^2 and a^2 + 7*b^2, with a > 0 and b > 0.
%C If a composite number C can be written in the form C = a^2 + k*b^2, for some integers a and b, then every prime factor P (for C) being raised to an odd power can be written in the form P = c^2 + k*d^2, for some integers c and d.
%C This statement is only true for k = 1, 2, 3.
%C For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.
%H Robert Israel, <a href="/A216828/b216828.txt">Table of n, a(n) for n = 1..10000</a>
%p filter:= proc(n) local L,x,y;
%p select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+y^2)]) <> []
%p and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+2*y^2)]) <> []
%p and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+3*y^2)]) <> []
%p and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+7*y^2)]) <> []
%p end proc:
%p select(filter, [$1..1000]); # _Robert Israel_, May 03 2018
%t okQ[n_] := Module[{x, y}, AllTrue[{1, 2, 3, 7}, Solve[x > 0 && y > 0 && n^2 == x^2 + #*y^2, {x, y}, Integers] =!= {}&]];
%t Select[Range[1000], okQ] (* _Jean-François Alcover_, May 23 2023 *)
%Y Cf. A216451, A216500, A216501, A216671, A216679, A216680, A216682.
%K nonn
%O 1,1
%A _V. Raman_, Sep 17 2012