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!)
A299825 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x <= y, x == y (mod 2), and |x+y-z| is a power of 4 (including 4^0 = 1). 2
1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 2, 3, 1, 3, 1, 2, 6, 1, 3, 4, 2, 2, 2, 2, 4, 5, 1, 3, 2, 2, 2, 2, 4, 3, 3, 2, 2, 3, 4, 3, 7, 4, 1, 6, 2, 3, 4, 1, 7, 4, 3, 6, 1, 4, 3, 3, 4, 2, 3, 5, 3, 2, 1, 1, 7, 5, 4, 3, 3, 4, 3, 3, 4, 4, 5, 6, 3, 2, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

COMMENTS

Conjecture: a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 6, 13, 15, 18, 27, 43, 53, 63, 93, 107, 109, 123, 141, 159, 165, 173, 477, 493, 653, 1005, 16^k*m (k = 0,1,2,... and m = 3, 4, 7, 8).

We have verified that a(n) > 0 for all n = 1..5*10^6.

A weaker version of the conjecture was proved by the author in arXiv:1701.05868.

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 1..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.

EXAMPLE

a(8) = 1 since 8 = 2^2 + 2^2 + 0^2 + 0^2 with 2 == 2 (mod 2) and 2 + 2 - 0 = 4.

a(13) = 1 since 13 = 0^2 + 2^2 + 3^2 + 0^2 with 0 == 2 (mod 2) and 0 + 2 - 3 = -4^0.

a(109) = 1 since 109 = 2^2 + 4^2 + 5^2 + 8^2 with 2 == 4 (mod 2) and 2 + 4 - 5 = 4^0.

a(123) = 1 since 123 = 1^2 + 3^2 + 8^2 + 7^2 with 1 == 3 (mod 2) and 1 + 3 - 8 = -4.

a(477) = 1 since 477 = 0^2 + 10^2 + 11^2 + 16^2 with 0 == 10 (mod 2) and 0 + 10 - 11 = -4^0.

a(653) = 1 since 653 = 8^2 + 12^2 + 21^2 + 2^2 with 8 == 12 (mod 2) and 8 + 12 - 21 = -4^0.

a(1005) = 1 since 1005 = 0^2 + 10^2 + 11^2 + 28^2 with 0 == 10 (mod 2) and 0 + 10 - 11 = -4^0.

MATHEMATICA

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

Pow[n_]:=Pow[n]=IntegerQ[Log[4, n]];

Do[r=0; Do[If[Mod[x-y, 2]==0&&Pow[Abs[x+y-z]]&&SQ[n-x^2-y^2-z^2], r=r+1], {x, 0, Sqrt[n/2]}, {y, x, Sqrt[n-x^2]}, {z, 0, Sqrt[n-x^2-y^2]}]; Print[n, " ", r], {n, 1, 80}]

CROSSREFS

Cf. A000118, A271518, A279612, A281945, A281976, A282463.

Sequence in context: A339382 A161093 A282904 * A289493 A324341 A271325

Adjacent sequences:  A299822 A299823 A299824 * A299826 A299827 A299828

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Feb 19 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 02:34 EDT 2022. Contains 356204 sequences. (Running on oeis4.)