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!)
A281945 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both x and x + y - z are powers of two (including 2^0 = 1). 2
1, 2, 2, 2, 3, 4, 3, 2, 4, 6, 2, 3, 4, 4, 4, 2, 4, 8, 5, 4, 4, 5, 4, 4, 6, 7, 5, 5, 4, 7, 4, 2, 8, 9, 5, 4, 6, 5, 5, 6, 5, 10, 5, 3, 8, 7, 3, 3, 8, 8, 8, 6, 2, 11, 8, 4, 5, 9, 4, 5, 7, 5, 6, 2, 9, 11, 10, 5, 6, 12, 3, 8, 9, 6, 9, 6, 4, 8, 4, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
65213 is the first positive integer which cannot be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers such that both x and x + y + z are powers of two. Though a(44997) = 0, we have
44997 = 128^2 + (-28)^2 + (-98)^2 + 1^2 with 128 = 2^7 and 128 + (-28) + (-98) = 2^1.
LINKS
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(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1 = 2^0 and 1 + 0 - 0 = 2^0.
a(2237) = 1 since 2237 = 8^2 + 29^2 + 36^2 + 6^2 with 8 = 2^3 and 8 + 29 - 36 = 2^0.
a(4397) = 1 since 4397 = 4^2 + 21^2 + 24^2 + 58^2 with 4 = 2^2 and 4 + 21 - 24 = 2^0.
a(5853) = 1 since 5853 = 2^2 + 52^2 + 52^2 + 21^2 with 2 = 2^1 and 2 + 52 - 52 = 2^1.
a(14711) = 1 since 14711 = 1^2 + 18^2 + 15^2 + 119^2 with 1 = 2^0 and 1 + 18 - 15 = 2^2.
a(16797) = 1 since 16797 = 64^2 + 42^2 + 104^2 + 11^2 with 64 = 2^6 and 64 + 42 - 104 = 2^1.
a(17861) = 1 since 17861 = 32^2 + 0^2 + 31^2 + 126^2 with 32 = 2^5 and 32 + 0 - 31 = 2^0.
a(20959) = 1 since 20959 = 2^2 + 109^2 + 95^2 + 7^2 with 2 = 2^1 and 2 + 109 - 95 = 2^4.
a(21799) = 1 since 21799 = 1^2 + 146^2 + 19^2 + 11^2 with 1 = 2^0 and 1 + 146 - 19 = 2^7.
a(24757) = 1 since 24757 = 64^2 + 56^2 + 119^2 + 58^2 with 64 = 2^6 and 64 + 56 - 119 = 2^0.
a(28253) = 1 since 28253 = 2^2 + 3^2 + 4^2 + 168^2 with 2 = 2^1 and 2 + 3 - 4 = 2^0.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Pow[n_]:=Pow[n]=n>0&&IntegerQ[Log[2, n]];
Do[r=0; Do[If[SQ[n-4^x-y^2-z^2]&&Pow[2^x+y-z], r=r+1], {x, 0, Log[4, n]}, {y, 0, Sqrt[n-4^x]}, {z, 0, Sqrt[n-4^x-y^2]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
Sequence in context: A151553 A151714 A039644 * A163107 A275840 A178065
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 02 2017
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 13 20:30 EDT 2024. Contains 375144 sequences. (Running on oeis4.)