cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-8 of 8 results.

A282494 Number of ways to write n as x^4 + y^2 + z^2 + w^2 with y*(y+240*z) a positive square, where x,y,z,w are nonnegative integers.

Original entry on oeis.org

1, 2, 1, 1, 4, 4, 1, 1, 3, 5, 4, 1, 3, 6, 3, 1, 6, 7, 3, 5, 9, 5, 1, 2, 6, 11, 7, 1, 7, 9, 2, 2, 6, 5, 5, 7, 7, 4, 1, 4, 10, 11, 3, 1, 9, 8, 2, 1, 5, 10, 8, 7, 10, 10, 4, 6, 8, 5, 4, 3, 9, 11, 4, 1, 11, 12, 4, 7, 13, 10, 2, 5, 5, 7, 7, 3, 10, 9, 1, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 16 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
By the linked JNT paper, any nonnegative integer can be expressed as the sum of a fourth power and three squares, and each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z*(y-2*z) = 0. Whether z = 0 or y = 2*z, the number y*(y+240*z) is definitely a square.
See also A282463 and A282495 for similar conjectures.

Examples

			a(3) = 1 since 3 = 1^4 + 1^2 + 0^2 + 1^2 with 1*(1+240*0) = 1^2.
a(4) = 1 since 4 = 0^4 + 2^2 + 0^2 + 0^2 with 2*(2+240*0) = 2^2.
a(39) = 1 since 39 = 1^4 + 2^2 + 3^2 + 5^2 with 2*(2+240*3) = 38^2.
a(188) = 1 since 188 = 3^4 + 5^2 + 1^2 + 9^2 with 5*(5+240*1) = 35^2.
a(399) = 1 since 399 = 3^4 + 10^2 + 7^2 + 13^2 with 10*(10+240*7) = 130^2.
a(428) = 1 since 428 = 0^4 + 10^2 + 2^2 + 18^2 with 10*(10+240*2) = 70^2.
a(439) = 1 since 439 = 1^4 + 10^2 + 7^2 + 17^2 with 10*(10+240*7) = 130^2.
a(508) = 1 since 508 = 1^4 + 5^2 + 11^2 + 19^2 with 5*(5+240*11) = 115^2.
a(748) = 1 since 748 = 3^4 + 1^2 + 21^2 + 15^2 with 1*(1+240*21) = 71^2.
a(1468) = 1 since 1468 = 2^4 + 10^2 + 26^2 + 26^2 with 10*(10+240*26) = 250^2.
a(2828) = 1 since 2828 = 3^4 + 5^2 + 11^2 + 51^2 with 5*(5+240*11) = 115^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[n-x^4-y^2-z^2]&&SQ[y*(y+240*z)],r=r+1],{x,0,(n-1)^(1/4)},{y,1,Sqrt[n-x^4]},{z,0,Sqrt[n-x^4-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A282495 Number of ways to write n as x^4 + y^2 + z^2 + w^2 with y^2 + 228*y*z + 60*z^2 a square, where x,y,z are nonnegative integers and w is a positive integer.

Original entry on oeis.org

1, 2, 2, 2, 3, 3, 1, 1, 3, 4, 4, 3, 3, 3, 1, 1, 5, 6, 5, 5, 4, 2, 1, 2, 6, 8, 8, 4, 4, 4, 1, 2, 6, 7, 7, 6, 4, 4, 1, 3, 9, 8, 5, 3, 6, 4, 1, 2, 5, 8, 8, 7, 6, 6, 3, 3, 8, 6, 5, 4, 4, 6, 3, 2, 9, 11, 6, 6, 6, 5, 1, 3, 8, 8, 7, 4, 5, 5, 1, 3
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 16 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
By the linked JNT paper, any nonnegative integer can be expressed as the sum of a fourth power and three squares, and each n = 0,1,2,... can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z*(y-z) = 0. Whether z = 0 or y = z, the number y^2 + 228*y*z + 60*z^2 is definitely a square.
See also A282463 and A282494 for similar conjectures.

Examples

			a(7) = 1 since 7 = 1^4 + 1^2 + 1^2 + 2^2 with 1^2 + 228*1*1 + 60*1^2 = 17^2.
a(8) = 1 since 8 = 0^4 + 2^2 + 0^2 + 2^2 with 2^2 + 228*2*0 + 60*0^2 = 2^2.
a(15) = 1 since 15 = 1^4 + 1^2 + 3^2 + 2^2 with 1^2 + 228*1*3 + 60*3^2 = 35^2.
a(23) = 1 since 23 = 1^4 + 3^2 + 3^2 + 2^2 with 3^2 + 228*3*3 + 60*3^2 = 51^2.
a(71) = 1 since 71 = 1^4 + 5^2 + 6^2 + 3^2 with 5^2 + 228*5*6 + 60*6^2 = 95^2.
a(159) = 1 since 159 = 3^4 + 7^2 + 2^2 + 5^2 with 7^2 + 228*7*2 + 60*2^2 = 59^2.
a(623) = 1 since 623 = 3^4 + 1^2 + 10^2 + 21^2 with 1^2 + 228*1*10 + 60*10^2 = 91^2.
a(879) = 1 since 879 = 5^4 + 5^2 + 15^2 + 2^2 with 5^2 + 228*5*15 + 60*15^2 = 175^2.
a(1423) = 1 since 1423 = 1^4 + 7^2 + 2^2 + 37^2 with 7^2 + 228*7*2 + 60*2^2 = 59^2.
a(3768) = 1 since 3768 = 0^4 + 2^2 + 20^2 + 58^2 with 2^2 + 228*2*20 + 60*20^2 = 182^2.
		

Crossrefs

Programs

  • Mathematica
    Q[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[n-x^4-y^2-z^2]&&SQ[y^2+228*y*z+60*z^2],r=r+1],{x,0,(n-1)^(1/4)},{y,0,Sqrt[n-1-x^4]},{z,0,Sqrt[n-1-x^4-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A282561 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 2*x - y and 4*z^2 + 724*z*w + w^2 are squares.

Original entry on oeis.org

1, 2, 2, 2, 4, 3, 5, 1, 3, 4, 2, 2, 2, 5, 7, 3, 2, 5, 3, 1, 4, 7, 7, 3, 2, 2, 2, 4, 3, 8, 8, 3, 2, 2, 4, 4, 9, 3, 9, 3, 4, 5, 6, 3, 3, 7, 5, 2, 2, 11, 6, 5, 4, 7, 7, 4, 2, 4, 3, 2, 2, 5, 10, 6, 4, 5, 9, 1, 7, 8, 10, 4, 4, 5, 6, 5, 3, 9, 3, 2, 3
Offset: 0

Views

Author

Zhi-Wei Sun, Feb 18 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 16^k*m (k = 0,1,2,... and m = 7, 19, 67, 191, 235, 265, 347, 888, 2559).
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 z*(z-w) = 0. Whether z = 0 or z = w, the number 4*z^2 + 724*z*w + w^2 is definitely a square.
See also A282562 for a similar conjecture.

Examples

			 a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 2*1 - 2 = 0^2 and 4*1^2 + 724*1*1 + 1^2 = 27^2.
a(19) = 1 since 19 = 1^2 + 1^2 + 1^2 + 4^2 with 2*1 - 1 = 1^2 and 4*1^2 + 724*1*4 + 4^2 = 54^2.
a(67) = 1 since 67 = 4^2 + 7^2 + 1^2 + 1^2 with 2*4 - 7 = 1^2 and 4*1^2 + 724*1*1 + 1^2 = 27^2.
a(191) = 1 since 191 = 9^2 + 2^2 + 5^2 + 9^2 with 2*9 - 2 = 4^2 and 4*5^2 + 724*5*9 + 9^2 = 181^2.
a(235) = 1 since 235 = 7^2 + 13^2 + 1^2 + 4^2 with 2*7 - 13 = 1^2 and 4*1^2 + 724*1*4 + 4^2 = 54^2.
a(265) = 1 since 265 = 4^2 + 7^2 + 10^2 + 10^2 with 2*4 - 7 = 1 and 4*10^2 + 724*10*10 + 10^2 = 270^2.
a(347) = 1 since 347 = 8^2 + 7^2 + 15^2 + 3^2 with 2*8 - 7 = 3^2 and 4*15^2 + 724*15*3 + 3^2 = 183^2.
a(888) = 1 since 888 = 14^2 + 12^2 + 8^2 + 22^2 with 2*14 - 12 = 4^2 and 4*8^2 + 724*8*22 + 22^2 = 358^2.
a(2559) = 1 since 2559 = 26^2 + 3^2 + 5^2 + 43^2 with 2*26 - 3 = 7^2 and 4*5^2 + 724*5*43 + 43^2 = 397^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[2x-y],Do[If[SQ[n-x^2-y^2-z^2]&&SQ[4z^2+724z*Sqrt[n-x^2-y^2-z^2]+(n-x^2-y^2-z^2)],r=r+1],{z,0,Sqrt[n-x^2-y^2]}]],{y,0,Sqrt[4n/5]},{x,Ceiling[y/2],Sqrt[n-y^2]}];Print[n," ",r];Continue,{n,0,80}]

A282562 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 2*x - y and 9*z^2 + 666*z*w + w^2 are squares.

Original entry on oeis.org

1, 2, 2, 2, 4, 4, 5, 2, 3, 5, 2, 2, 1, 5, 6, 2, 2, 5, 5, 1, 5, 7, 8, 1, 3, 4, 2, 4, 3, 9, 7, 5, 2, 5, 5, 4, 8, 3, 9, 3, 4, 4, 5, 3, 1, 7, 6, 3, 2, 13, 7, 5, 5, 5, 8, 3, 2, 3, 5, 2, 1, 6, 10, 6, 4, 8, 9, 1, 7, 8, 11, 3, 3, 6, 6, 5, 3, 11, 4, 4, 4
Offset: 0

Views

Author

Zhi-Wei Sun, Feb 18 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 16^k*m (k = 0,1,2,... and m = 12, 19, 23, 44, 60, 67, 139, 140, 248, 264, 347, 427, 499, 636, 1388, 1867, 1964, 4843).
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 z*(z-w) = 0. Whether z = 0 or z = w, the number 9*z^2 + 666*z*w + w^2 is definitely a square.
See also A282561 for a similar conjecture.

Examples

			a(12) = 1 since 12 = 2^2 + 0^2 + 2^2 + 2^2 with 2*2 - 0 = 2^2 and 9*2^2 + 666*2*2 + 2^2 = 52^2.
a(19) = 1 since 19 = 1^2 + 1^2 + 4^2 + 1^2 with 2*1 - 1 = 1^2 and 9*4^2 + 666*4*1 + 1^2 = 53^2.
a(44) = 1 since 44 = 5^2 + 1^2 + 3^2 + 3^2 with 2*5 - 1 = 3^2 and 9*3^2 + 666*3*3 + 3^2 = 78^2.
a(60) = 1 since 60 = 3^2 + 5^2 + 1^2 + 5^2 with 2*3 - 5 = 1^2 and 9*1^2 + 666*1*5 + 5^2 = 58^2.
a(67) = 1 since 67 = 4^2 + 7^2 + 1^2 + 1^2 with 2*4 - 7 = 1^2 and 9*1^2 + 666*1*1 + 1^2 = 26^2.
a(139) = 1 since 139 = 8^2 + 7^2 + 1^2 + 5^2 with 2*8 - 7 = 3^2 and 9*1^2 + 666*1*5 + 5^2 = 58^2.
a(140) = 1 since 140 = 3^2 + 5^2 + 5^2 + 9^2 with 2*3 - 5 = 1^2 and 9*5^2 + 666*5*9 + 9^2 = 174^2.
a(264) = 1 since 264 = 8^2 + 0^2 + 10^2 + 10^2 with 2*8 - 0 = 4^2 and 9*10^2 + 666*10*10 + 10^2 = 260^2.
a(499) = 1 since 499 = 7^2 + 5^2 + 20^2 + 5^2 with 2*7 - 5 = 3^2 and 9*20^2 + 666*20*5 + 5^2 = 265^2.
a(1388) = 1 since 1388 = 15^2 + 21^2 + 19^2 + 19^2 with 2*15 - 21 = 3^2 and 9*19^2 + 666*19*19 + 19^2 = 494^2.
a(1867) = 1 since 1867 = 16^2 + 31^2 + 5^2 + 25^2 with 2*16 - 31 = 1^2 and 9*5^2 + 666*5*25 + 25^2 = 290^2.
a(4843) = 1 since 4843 = 11^2 + 13^2 + 52^2 + 43^2 with 2*11 - 13 = 3^2 and 9*52^2 + 666*52*43 + 43^2 = 1231^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[2x-y],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,0,Sqrt[n-x^2-y^2]}]],{y,0,Sqrt[4n/5]},{x,Ceiling[y/2],Sqrt[n-y^2]}];Print[n," ",r];Continue,{n,0,80}]

A282545 Number of ways to write n as x^4 + y^2 + z^2 + w^2 with y^2 + 64*z^2 + 1024*y*z a square, where x,y,z,w are nonnegative integers with y > 0.

Original entry on oeis.org

1, 3, 3, 2, 4, 5, 2, 2, 5, 5, 3, 2, 4, 5, 2, 1, 6, 9, 5, 5, 8, 6, 2, 4, 8, 7, 5, 3, 7, 7, 1, 3, 8, 8, 4, 6, 7, 6, 2, 4, 9, 6, 3, 2, 9, 6, 1, 3, 6, 10, 6, 8, 9, 11, 5, 4, 9, 6, 6, 3, 8, 8, 3, 2, 8, 10, 6, 9, 11, 9, 1, 5, 9, 9, 6, 2, 7, 6, 1, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 18 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) Any nonnegative integer can be written as x^4 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that a*y^2 + b*y*z + c*z^2 is a square, whenever (a,b,c) is among the ordered triples (1,484,44), (1,666,9), (16,1336,169), (25,900,36).
(iii) For each c = 1, 49, any nonnegative integer can be written as x^4 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 120*(x^2+y)*z + c*z^2 is a square.
By the linked JNT paper, each n = 0,1,2,... can be expressed as the sum of a fourth power and three squares.
See also A282463, A282494 and A282495 for similar conjectures.

Examples

			a(1) = 1 since 1 = 0^4 + 1^2 + 0^2 + 0^2 with 1^2 + 64*0^2 + 1024*1*0 = 1^2.
a(31) = 1 since 31 = 1^4 + 2^2 + 1^2 + 5^2 with 2^2 + 64*1^2 + 1024*2*1 = 46^2.
a(47) = 1 since 47 = 1^4 + 6^2 + 3^2 + 1^2 with 6^2 + 64*3^2 + 1024*6*3 = 138^2.
a(79) = 1 since 79 = 1^4 + 7^2 + 2^2 + 5^2 with 7^2 + 64*2^2 + 1024*7*2 = 121^2.
a(156) = 1 since 156 = 3^4 + 5^2 + 5^2 + 5^2 with 5^2 + 64*5^2 + 1024*5*5 = 165^2.
a(184) = 1 since 184 = 0^4 + 12^2 + 6^2 + 2^2 with 12^2 + 64*6^2 + 1024*12*6 = 276^2.
a(316) = 1 since 316 = 2^4 + 10^2 + 10^2 + 10^2 with 10^2 + 64*10^2 + 1024*10*10 = 330^2.
a(380) = 1 since 380 = 1^4 + 3^2 + 3^2 + 19^2 with 3^2 + 64*3^2 + 1024*3*3 = 99^2.
a(2383) = 1 since 2383 = 3^4 + 22^2 + 33^2 + 27^2 with 22^2 + 64*33^2 + 1024*22*33 = 902^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-x^4-y^2-z^2]&&SQ[y^2+1024y*z+64z^2],r=r+1],{x,0,(n-1)^(1/4)},{y,1,Sqrt[n-x^4]},{z,0,Sqrt[n-x^4-y^2]}];Print[n," ",r];Continue,{n,1,80}]

A337082 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with 2*x^2 + 4*y^2 - 7*x*y a power of two (including 2^0 = 1), where x, y, z, w are nonnegative integers with z <= w.

Original entry on oeis.org

2, 2, 2, 2, 5, 5, 1, 2, 5, 4, 3, 3, 4, 7, 3, 2, 8, 8, 4, 6, 10, 6, 3, 5, 5, 9, 4, 2, 8, 10, 2, 2, 9, 4, 5, 6, 5, 7, 3, 4, 10, 10, 1, 4, 9, 6, 2, 3, 6, 8, 6, 4, 11, 12, 4, 7, 10, 5, 3, 5, 5, 9, 5, 2, 14, 16, 3, 9, 18, 9, 3, 8, 9, 11, 7, 5, 12, 14, 3, 6, 16, 11, 5, 12, 12, 10, 4, 6, 15, 17, 6, 5, 12, 9, 4, 5, 7, 12, 7, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 12 2020

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. Moreover, any positive integer n congruent to 1 or 2 modulo 4 can be written as x^2 + y^2 + z^2 + w^2 with x, y, z, w nonnegative integers such that 2*x^2 + 4*y^2 - 7*x*y = 4^k for some positive integer k.
We have verified this for all n = 1..10^8.
See also A338139 for a similar conjecture.

Examples

			a(7) = 1, and 7 = 1^2 + 2^2 + 1^2 + 1^2 with 2*1^2 + 4*2^2 - 7*1*2 = 2^2.
a(43) = 1, and 43 = 4^2 + 1^2 + 1^2 + 5^2 with 2*4^2 + 4*1^2 - 7*4*1 = 2^3.
a(283) = 1, and 283 = 4^2 + 7^2 + 7^2 + 13^2 with 2*4^2 + 4*7^2 - 7*4*7 = 2^5.
a(2731) = 1, and 2731 = 5^2 + 7^2 + 16^2 + 49^2 with 2*5^2 + 4*7^2 - 7*5*7 = 2^0.
a(25475) = 1, and 25475 = 68^2 + 95^2 + 45^2 + 99^2 with 2*68^2 + 4*95^2 - 7*68*95 = 2^7.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PQ[n_]:=PQ[n]=n>0&&IntegerQ[Log[2,n]];
    tab={};Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&PQ[2x^2+4*y^2-7*x*y],r=r+1],{x,0,Sqrt[n]},{y,Boole[x==0],Sqrt[n-x^2]},{z,0,Sqrt[(n-x^2-y^2)/2]}];tab=Append[tab,r],{n,1,100}];tab

A338139 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x^2 + 26*y^2 - 11*x*y a power of two (including 2^0 = 1), where x, y, z, w are nonnegative integers with z <= w.

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 2, 2, 4, 5, 3, 4, 3, 4, 3, 2, 4, 6, 3, 5, 6, 4, 2, 4, 4, 5, 4, 4, 4, 6, 2, 2, 7, 5, 3, 6, 5, 4, 3, 5, 7, 8, 1, 4, 8, 4, 2, 4, 5, 6, 4, 5, 5, 6, 4, 4, 8, 5, 2, 6, 4, 3, 3, 2, 8, 11, 3, 5, 11, 6, 1, 6, 8, 7, 5, 4, 6, 5, 1, 5, 10, 10, 5, 9, 8, 5, 4, 4, 8, 14, 5, 5, 8, 4, 4, 4, 6, 7, 5, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 12 2020

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0. Moreover, any positive integer n congruent to 1 or 2 modulo 4 can be written as x^2 + y^2 + z^2 + w^2 with x, y, z, w nonnegative integers such that x^2 + 26*y^2 - 11*x*y = 4^k for some nonnegative integer k.
We have verified this for all n = 1..10^8.
See also A337082 for a similar conjecture.

Examples

			a(1) = 1, and 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1^2 + 26*0^2 - 11*1*0 = 2^0.
a(43) = 1, and 43 = 1^2 + 1^2 + 4^2 + 5^2 with 1^2 + 26*1^2 - 11*1*1 = 2^4.
a(6547) = 1, and 6547 = 17^2 + 1^2 + 4^2 + 79^2 with 17^2 + 26*1^2 - 11*17*1 = 2^7.
a(11843) = 1, and 11843 = 3^2 + 1^2 + 13^2 + 108^2 with 3^2 + 26*1^2 - 11*3*1 = 2^1.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PQ[n_]:=PQ[n]=n>0&&IntegerQ[Log[2,n]];
    tab={};Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&PQ[x^2+26*y^2-11*x*y],r=r+1],{x,0,Sqrt[n]},{y,Boole[x==0],Sqrt[n-x^2]},{z,0,Sqrt[(n-x^2-y^2)/2]}];tab=Append[tab,r],{n,1,100}];tab

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).

Original entry on oeis.org

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
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 19 2018

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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}]
Showing 1-8 of 8 results.