editing
approved
editing
approved
editing
approved
Numbers which can be written as aare simultaneously of the form x^2+by^2, ax^2+2*b2y^2, ax^2+3*b3y^2, ax^2+7*b7y^2, where a all with x> 0, b y> 0.
Definition clarified by N. J. A. Sloane, Sep 11 2012
approved
editing
editing
approved
A number can be written as a^2+b^2 if and only if it has got no prime factor congruent to 3 (mod 4) raised to an odd power.
A number can be written as a^2+2*b^2 if and only if it has got no prime factor congruent to 5 (mod 8) or 7 (mod 8) raised to an odd power.
A number can be written as a^2+3*b^2 if and only if it has got no prime factor congruent to 2 (mod 3) raised to an odd power.
A number can be written as a^2+7*b^2 if and only if it has got no prime factor congruent to 3 (mod 7) or 5 (mod 7) or 6 (mod 7) raised to an odd power. Also the power of 2 should not be 1, if it can be written in the form a^2+7*b^2.
nn = 4657; lim = Floor[Sqrt[nn]]; t1 = Select[Union[Flatten[Table[a^2 + b^2, {a, lim}, {b, lim}]]], # <= nn &]; t2 = Select[Union[Flatten[Table[a^2 + 2* b^2, {a, lim}, {b, lim/Sqrt[2]}]]], # <= nn &]; t3 = Select[Union[Flatten[Table[a^2 + 3* b^2, {a, lim}, {b, lim/Sqrt[3]}]]], # <= nn &]; t7 = Select[Union[Flatten[Table[a^2 + 7* b^2, {a, lim}, {b, lim/Sqrt[7]}]]], # <= nn &]; Intersection[t1, t2, t3, t7] (* T. D. Noe, Sep 08 2012 *)
nn = 4657; lim = Floor[Sqrt[nn]]; t1 = Select[Union[Flatten[Table[a^2 + b^2, {a, lim}, {b, lim}]]], # <= nn &]; t2 = Select[Union[Flatten[Table[a^2 + 2* b^2, {a, lim}, {b, lim/Sqrt[2]}]]], # <= nn &]; t3 = Select[Union[Flatten[Table[a^2 + 3* b^2, {a, lim}, {b, lim/Sqrt[3]}]]], # <= nn &]; t7 = Select[Union[Flatten[Table[a^2 + 7* b^2, {a, lim}, {b, lim/Sqrt[7]}]]], # <= nn &]; Intersection[t1, t2, t3, t7] (* T. D. Noe, Sep 08 2012 *)
proposed
editing
editing
proposed
A number can be written as a^2+7*b^2 if and only if it has got no prime factor congruent to 3 (mod 7) or 5 (mod 7) or 6 (mod 7) raised to an odd power. Also the power of 2 and some even numbers cannot should not be 1, if it can be written in the form a^2+7*b^2.