login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A273302 Least nonnegative integer x such that n = x^2 + y^2 + z^2 + w^2 for some nonnegative integer y,z,w with x + 3*y + 5*z a square. 12
0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 1, 2, 0, 0, 0, 1, 1, 2, 2, 1, 0, 0, 0, 1, 1, 0, 0, 5, 4, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 2, 4, 0, 0, 1, 1, 4, 0, 1, 0, 0, 0, 0, 5, 0, 0, 2, 0, 0, 1, 0, 1, 1, 2, 3, 0, 0, 0, 1, 0, 0, 0, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,16
COMMENTS
Clearly, a(n) = 0 if n is a square. Part (i) of the conjecture in A271518 implies that a(n) always exists.
Compare this sequence with A273294.
For more conjectural refinements of Lagrange's four-square theorem, one may consult arXiv:1604.06723.
LINKS
Zhi-Wei Sun, Refining Lagrange's four-square theorem, arXiv:1604.06723 [math.GM], 2016.
EXAMPLE
a(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 1 + 3*1 + 5*0 = 2^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 + 3*1 + 5*1 = 3^2.
a(15) = 2 since 15 = 2^2 + 3^2 + 1^2 + 1^2 with 2 + 3*3 + 5*1 = 4^2.
a(31) = 5 since 31 = 5^2 + 2^2 + 1^2 + 1^2 with 5 + 3*2 + 5*1 = 4^2.
a(32) = 4 since 32 = 4^2 + 0^2 + 0^2 + 4^2 with 4 + 3*0 + 5*0 = 2^2.
a(2384) = 24 since 2384 = 24^2 + 12^2 + 8^2 + 40^2 with 24 + 3*12 + 5*8 = 10^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
Do[Do[If[SQ[n-x^2-y^2-z^2]&&SQ[x+3y+5z], Print[n, " ", x]; Goto[aa]], {x, 0, Sqrt[n]}, {y, 0, Sqrt[n-x^2]}, {z, 0, Sqrt[n-x^2-y^2]}]; Label[aa]; Continue, {n, 0, 80}]
CROSSREFS
Sequence in context: A029431 A091492 A284264 * A025086 A035699 A132406
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, May 19 2016
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 05:35 EDT 2024. Contains 371697 sequences. (Running on oeis4.)