login
This site is supported by donations 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, Table of n, a(n) for n = 0..10000

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

Cf. A000118, A000290, A260625, A261876, A262357, A267121, A268197, A268507, A269400, A270073, A271510, A271513, A271518, A271608, A271665, A271714, A271721, A271724, A271775, A271778, A271824, A272084, A272332, A272351, A272620, A272888, A272977, A273021, A273107, A273108, A273110, A273134, A273278, A273294.

Sequence in context: A029431 A091492 A284264 * A025086 A035699 A132406

Adjacent sequences:  A273299 A273300 A273301 * A273303 A273304 A273305

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 08:31 EDT 2019. Contains 327062 sequences. (Running on oeis4.)