cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A216828 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.

This page as a plain text file.
%I A216828 #18 May 23 2023 07:25:34
%S A216828 60,68,110,111,120,136,143,156,164,174,180,193,204,215,220,222,226,
%T A216828 240,272,274,286,292,300,312,318,327,328,330,333,335,337,340,348,356,
%U A216828 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 A216828 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 A216828 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 A216828 This statement is only true for k = 1, 2, 3.
%C A216828 For k = 7, with the exception of the prime factor 2, the statement mentioned above is true.
%H A216828 Robert Israel, <a href="/A216828/b216828.txt">Table of n, a(n) for n = 1..10000</a>
%p A216828 filter:= proc(n) local L,x,y;
%p A216828   select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+y^2)]) <> []
%p A216828   and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+2*y^2)]) <> []
%p A216828   and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+3*y^2)]) <> []
%p A216828   and select(t -> subs(t, x*y) > 0, [isolve(n^2=x^2+7*y^2)]) <> []
%p A216828 end proc:
%p A216828 select(filter, [$1..1000]); # _Robert Israel_, May 03 2018
%t A216828 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 A216828 Select[Range[1000], okQ] (* _Jean-François Alcover_, May 23 2023 *)
%Y A216828 Cf. A216451, A216500, A216501, A216671, A216679, A216680, A216682.
%K A216828 nonn
%O A216828 1,1
%A A216828 _V. Raman_, Sep 17 2012