login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A300708 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that x or y is a square and x - y is also a square. 15
1, 2, 3, 2, 2, 3, 3, 2, 1, 3, 4, 2, 1, 2, 2, 2, 2, 3, 5, 2, 3, 3, 2, 1, 1, 5, 6, 5, 2, 3, 5, 3, 3, 4, 7, 3, 5, 4, 3, 3, 2, 8, 8, 4, 1, 6, 4, 1, 2, 3, 9, 7, 6, 3, 5, 4, 1, 6, 5, 3, 2, 5, 3, 3, 2, 5, 11, 4, 3, 4, 5, 1, 2, 5, 5, 6, 3, 5, 4, 2, 3 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

COMMENTS

Conjecture: a(n) > 0 for all n >= 0, and a(n) = 1 only for m = 16^k*m with k = 0,1,2,... and m = 0, 8, 12, 23, 24, 44, 47, 56, 71, 79, 92, 95, 140, 168, 184, 248, 344, 428, 568, 632, 1144, 1544.

By the author's 2017 JNT paper, each nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x - y (or x) is a square.

See also A281976, A300666, A300667 and A300712 for similar conjectures.

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 0..10000

Zhi-Wei Sun, Refining Lagrange's four-square theorem, J. Number Theory 175(2017), 167-190.

Zhi-Wei Sun, Restricted sums of four squares, arXiv:1701.05868 [math.NT], 2017-2018.

EXAMPLE

a(71) = 1 since 71 = 5^2 + 1^2 + 3^2 + 6^2 with 1 = 1^2 and 5 - 1 = 2^2.

a(95) = 1 since 95 = 2^2 + 1^2 + 3^2 + 9^2 with 1 = 1^2 and 2 - 1 = 1^2.

a(344) = 1 since 344 = 4^2 + 0^2 + 2^2 + 18^2 with 4 = 2^2 and 4 - 0 = 2^2.

a(428) = 1 since 428 = 13^2 + 9^2 + 3^2 + 13^2 with 9 = 3^2 and 13 - 9 = 2^2.

a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 = 4^2 and 16 - 12 = 2^2.

a(1144) = 1 since 1144 = 20^2 + 16^2 + 2^2 + 22^2 with 16 = 4^2 and 20 - 16 = 2^2.

a(1544) = 1 since 1544 = 0^2 + 0^2 + 10^2 + 38^2 with 0 = 0^2 and 0 - 0 = 0^2.

MATHEMATICA

SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];

tab={}; Do[r=0; Do[If[(SQ[m^2+y]||SQ[y])&&SQ[n-(m^2+y)^2-y^2-z^2], r=r+1], {m, 0, n^(1/4)}, {y, 0, Sqrt[(n-m^4)/2]}, {z, 0, Sqrt[Max[0, (n-(m^2+y)^2-y^2)/2]]}]; tab=Append[tab, r], {n, 0, 80}]; Print[tab]

CROSSREFS

Cf. A000118, A000290, A271518, A271775, A281976, A300666, A300667, A300712.

Sequence in context: A256795 A273404 A281976 * A240755 A256170 A051686

Adjacent sequences:  A300705 A300706 A300707 * A300709 A300710 A300711

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Mar 11 2018

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 February 23 05:58 EST 2019. Contains 320411 sequences. (Running on oeis4.)