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!)
A281729 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,z positive integers and y,w nonnegative integers such that both 9*x^2 + 246*x*y + y^2 and 9*z^2 + 666*z*w + w^2 are squares. 1
0, 1, 2, 1, 2, 4, 2, 1, 4, 5, 2, 2, 4, 3, 1, 1, 5, 5, 3, 4, 6, 6, 2, 4, 5, 5, 5, 3, 5, 5, 3, 1, 7, 8, 2, 5, 6, 7, 2, 5, 7, 4, 2, 3, 7, 4, 3, 2, 5, 7, 5, 6, 7, 12, 4, 3, 7, 7, 2, 1, 7, 5, 4, 1, 7, 7, 3, 7, 8, 6, 2, 5, 7, 6, 4, 4, 8, 4, 1, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
The first three values of n with a(n) = 0 are 1, 214635, 241483.
By the linked JNT paper, any nonnegative integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and x*(x-y) = 0, Whether x = 0 or x = y, both 9*x^2 + 246*x*y + y^2 and 9*x^2 + 666*x*y + y^2 are squares.
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(2) = 1 since 2 = 1^2 + 0^2 + 1^2 + 0^2 with 9*1^2 + 246*1*0 + 1^2 = 3^2 and 9*1^2 + 666*1*0 + 0^2 = 3^2.
a(4) = 1 since 4 = 1^2 + 1^2 + 1^2 + 1^2 with 9*1^2 + 246*1*1 + 1^2 = 16^2 and 9*1^2 + 666*1*1 + 1^2 = 26^2.
a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + 1^2 with 9*2^2 + 246*2*3 + 3^2 = 39^2 and 9*1^2 + 666*1*1 + 1^2 = 26^2.
a(159) = 1 since 159 = 11^2 + 3^2 + 5^2 + 2^2 with 9*11^2 + 246*11*3 + 3^2 = 96^2 and 9*5^2 + 666*5*2 + 2^2 = 83^2.
a(515) = 1 since 515 = 15^2 + 0^2 + 17^2 + 1^2 with 9*15^2 + 246*15*0 + 0^2 = 45^2 and 9*17^2 + 666*17*1 + 1^2 = 118^2.
a(9795) = 1 since 9795 = 35^2 + 91^2 + 17^2 + 0^2 with 9*35^2 + 246*35*91 + 91^2 = 896^2 and 9*17^2 + 666*17*0 + 0^2 = 51^2.
a(84155) = 1 since 84155 = 281^2 + 0^2 + 35^2 + 63^2 with 9*281^2 + 246*281*0 + 0^2 = 843^2 and 9*35^2 + 666*35*63 + 63^2 = 1218^2.
a(121003) = 1 since 121003 = 319^2 + 87^2 + 3^2 + 108^2 with 9*319^2 + 246*319*87 + 87^2 = 2784^2 and 9*3^2 + 666*3*108 + 108^2 = 477^2.
a(133647) = 1 since 133647 = 217^2 + 217^2 + 115^2 + 162^2 with 9*217^2 + 246*217*217 + 217^2 = 3472^2 and 9*115^2 + 666*115*162 + 162^2 = 3543^2.
MATHEMATICA
SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
Do[r=0; Do[If[SQ[9x^2+246x*y+y^2], Do[If[SQ[n-x^2-y^2-z^2]&&SQ[9z^2+666z*Sqrt[n-x^2-y^2-z^2]+(n-x^2-y^2-z^2)], r=r+1], {z, 1, Sqrt[n-x^2-y^2]}]], {x, 1, Sqrt[n]}, {y, 0, Sqrt[n-x^2]}]; Print[n, " ", r]; Continue, {n, 1, 80}]
CROSSREFS
Sequence in context: A225081 A307368 A097082 * A302290 A145173 A361656
KEYWORD
nonn
AUTHOR
Zhi-Wei Sun, Feb 19 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 July 23 04:10 EDT 2024. Contains 374544 sequences. (Running on oeis4.)