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.

Previous Showing 11-20 of 140 results. Next

A300219 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and z <= w such that both x and 4*x - 3*y are powers of 4 (including 4^0 = 1).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 28 2018

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m (k = 0,1,2,... and m = 1, 2, 3, 5, 15, 37, 83, 263). Also, for each n = 2,3,... we can write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both x and 4*x - 3*y lie in the set {2^(2k+1): k = 0,1,...}.
(ii) Let r be 0 or 1, and let n > r. Then n^2 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that both x and x + 3*y belong to the set {2^(2k+r): k = 0,1,2,...}, unless n has the form 2^(2k+r)*81503 with k a nonnegative integer and hence n^2 = (2^(2k+r)*28^2)^2 + (2^(2k+r)*80)^2 + (2^(2k+r)*55937)^2 + (2^(2k+r)*59272)^2 with 2^(2k+r)*28^2 = 2^r*(2^k*28)^2 and 2^(2k+r)*28^2 + 3*(2^(2k+r)*80) = 2^(2(k+5)+r). So we always can write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x/2^r is a square and (x+3*y)/2^r is a power of 4.
In arXiv:1701.05868 the author proved that for each r = 0,1 and n > r we can write n^2 as (2^(2k+r))^2 + x^2 + y^2 + z^2 with k,x,y,z nonnegative integers.
We have verified both parts of the conjecture for n up to 10^7.

Examples

			a(2) = 1 since 2^2 = 1^2 + 1^2 + 1^2 + 1^2 with 1 = 4^0 and 4*1 - 3*1 = 4^0.
a(3) = 1 since 3^2 = 1^2 + 0^2 + 2^2 + 2^2 with 1 = 4^0 and 4*1 - 3*0 = 4^1.
a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4 = 4^1 and 4*4 - 3*0 = 4^2.
a(15) = 1 since 15^2 = 4^2 + 4^2 + 7^2 + 12^2 with 4 = 4^1 and 4*4 - 3*4 = 4^1.
a(37) = 1 since 37^2 = 16^2 + 16^2 + 4^2 + 29^2 with 16 = 4^2 and 4*16 - 3*16 = 4^2.
a(83) = 1 since 83^2 = 4^2 + 4^2 + 56^2 + 61^2 with 4 = 4^1 and 4*4 - 3*4 = 4^1.
a(263) = 1 since 263^2 = 4^2 + 5^2 + 22^2 + 262^2 with 4 = 4^1 and 4*4 - 3*5 = 4^0.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[n^2-16^k-((4^(k+1)-4^m)/3)^2-z^2],r=r+1],{k,0,Log[4,n]},{m,Ceiling[Log[4,Max[1,4^(k+1)-3*Sqrt[n^2-16^k]]]],k+1},{z,0,Sqrt[(n^2-16^k-((4^(k+1)-4^m)/3)^2)/2]}];Print[n," ",r];Label[aa],{n,1,80}]

A303233 Number of ways to write n as a*(a+1)/2 + b*(b+1)/2 + 2^c + 2^d, where a,b,c,d are nonnegative integers with a <= b and c <= d.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 4, 6, 7, 7, 7, 9, 7, 8, 9, 9, 8, 12, 11, 11, 11, 11, 11, 14, 11, 13, 12, 11, 10, 14, 11, 12, 17, 15, 12, 16, 14, 15, 17, 19, 15, 16, 13, 15, 17, 17, 16, 20, 16, 14, 17, 17, 14, 22, 17, 14, 14, 17, 15, 19
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 20 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1. In other words, any integer n > 1 can be written as the sum of two triangular numbers and two powers of 2.
a(n) > 0 for all n = 2..10^9. See A303234 for numbers of the form x*(x+1)/2 + 2^y with x and y nonnegative integers. See also A303363 for a stronger conjecture.
In contrast, Crocker proved in 2008 that there are infinitely many positive integers not representable as the sum of two squares and at most two powers of 2.

Examples

			a(2) = 1 with 2 = 0*(0+1)/2 + 0*(0+1)/2 + 2^0 + 2^0.
a(3) = 2 with 3 = 0*(0+1)/2 + 1*(1+1)/2 + 2^0 + 2^0 = 0*(0+1)/2 + 0*(0+1)/2 + 2^0 + 2^1.
a(4) = 3 with 4 = 1*(1+1)/2 + 1*(1+1)/2 + 2^0 + 2^0 = 0*(0+1)/2 + 1*(1+1)/2 + 2^0 + 2^1 = 0*(0+1)/2 + 0*(0+1)/2 + 2^1 + 2^1.
		

References

  • R. C. Crocker, On the sum of two squares and two powers of k, Colloq. Math. 112(2008), 235-267.

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1],4]==3&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    tab={};Do[r=0;Do[If[QQ[4(n-2^k-2^j)+1],Do[If[SQ[8(n-2^k-2^j-x(x+1)/2)+1],r=r+1],{x,0,(Sqrt[4(n-2^k-2^j)+1]-1)/2}]],{k,0,Log[2,n]-1},{j,k,Log[2,n-2^k]}];tab=Append[tab,r],{n,1,60}];Print[tab]

A271778 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and x^2 + 3*y^2 + 5*z^2 - 8*w^2 a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 14 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 1, 15, 29, 33, 47, 53, 65, 89, 129, 689, 1553, 2^(2k+1)*m (k = 0,1,2,... and m = 1, 29).
(ii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x^2 + b*y^2 + c*z^2 - d*w^2 a square, if (a,b,c,d) is among the following quadruples: (1,3,6,3), (1,3,9,3), (1,3,30,3), (1,4,12,4), (1,4,20,4), (1,5,20,5), (1,5,35,20), (3,4,9,3), (3,9,40,3), (4,5,16,4), (4,11,33,11), (4,12,16,7), (5,16,20,20), (5,25,36,5), (6,10,25,10), (9,12,28,12), (9,21,28,21), (15,21,25,15), (15,24,25,15), (1,5,60,5), (1,20,60,20), (9, 28,63,63), (9,28,84,84), (12,33,64,12), (16,21,105,21), (16,33,64,16), (21,25,45,45), (24,25,75,75), (24,25,96,96), (25,40,96,40), (25,48,96,48), (25,60,84,60), (25,60,96,60), (25,75,126,75), (32,64,105,32).
(iii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x^2 + b*y^2 - c*z^2 -d*w^2 a square, whenever (a,b,c,d) is among the quadruples (3,9,3,20), (5,9,5,20), (5,25,4,5), (9,81,9,20),(12,16,3,12), (16,64,15,16), (20,25,4,20), (27,81,20,27), (30,64,15,30), (32,64,15,32), (48,64,15,48), (60,64,15,60), (60,81,20,60), (64,80,15,80).
(iv) For each triple (a,b,c) = (21,5,15), (36,3,8), (48,8,39), (64,7,8), (40,15,144), (45,20,144), (69,20,60), any natural number can be written as x^2 + y^2 + z^2 + w^2 with w,x,y,z nonnegative integers and a*x^2 - b*y^2 - c*z^2 a square.
See also A271510, A271513, A271518, A271665, A271714, A271721, A271724 and A271775 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(2) = 1 since 2 = 1^2 + 1^2 + 0^2 + 0^2 with 1^2 + 3*1^2 + 5*0^2 - 8*0^2 = 2^2.
a(15) = 1 since 15 = 1^2 + 3^2 + 1^2 + 2^2 with 1^2 + 3*3^2 + 5*1^2 - 8*2^2 = 1^2.
a(29) = 1 since 29 = 3^2 + 4^2 + 0^2 + 2^2 with 3^2 + 3*4^2 + 5*0^2 - 8*2^2 = 5^2.
a(33) = 1 since 33 = 2^2 + 4^2 + 2^2 + 3^2 with 2^2 + 3*4^2 + 5*2^2 - 8*3^2 = 0.
a(47) = 1 since 47 = 5^2 + 3^2 + 2^2 + 3^2 with 5^2 + 3*3^2 + 5*2^2 - 8*3^2 = 0^2.
a(53) = 1 since 53 = 3^2 + 2^2 + 6^2 + 2^2 with 3^2 + 3*2^2 + 5*6^2 - 8*2^2 = 13^2.
a(58) = 1 since 58 = 4^2 + 1^2 + 5^2 + 4^2 with 4^2 + 3*1^2 + 5*5^2 - 8*4^2 = 4^2.
a(65) = 1 since 65 = 3^2 + 6^2 + 2^2 + 4^2 with 3^2 + 3*6^2 + 5*2^2 - 8*4^2 = 3^2.
a(89) = 1 since 89 = 6^2 + 4^2 + 6^2 + 1^2 with 6^2 + 3*4^2 + 5*6^2 - 8*1^2 = 16^2.
a(129) = 1 since 129 = 9^2 + 4^2 + 4^2 + 4^2 with 9^2 + 3*4^2 + 5*4^2 - 8*4^2 = 9^2.
a(689) = 1 since 689 = 11^2 + 18^2 + 10^2 + 12^2 with 11^2 + 3*18^2 + 5*10^2 - 8*12^2 = 21^2.
a(1553) = 1 since 1553 = 21^2 + 6^2 + 26^2 + 20^2 with 21^2 + 3*6^2 + 5*26^2 - 8*20^2 = 27^2.
		

Crossrefs

Programs

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

A303363 Number of ways to write n as a*(a+1)/2 + b*(b+1)/2 + 2^c + 2^d, where a,b,c,d are nonnegative integers with a <= b, c <= d and 2|c.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 22 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This is stronger than the author's conjecture in A303233. I have verified a(n) > 0 for all n = 2..10^9.
In contrast, Corcker proved in 2008 that there are infinitely many positive integers not representable as the sum of two squares and at most two powers of 2.

Examples

			a(2) = 1 with 2 = 0*(0+1)/2 + 0*(0+1)/2 + 2^0 + 2^0.
a(3) = 2 with 3 = 0*(0+1)/2 + 1*(1+1)/2 + 2^0 + 2^0 = 0*(0+1)/2 + 0*(0+1)/2 + 2^0 + 2^1.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[Mod[Part[Part[f[n],i],1],4]==3&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    tab={};Do[r=0;Do[If[QQ[4(n-4^j-2^k)+1],Do[If[SQ[8(n-4^j-2^k-x(x+1)/2)+1],r=r+1],{x,0,(Sqrt[4(n-4^j-2^k)+1]-1)/2}]],{j,0,Log[4,n/2]},{k,2j,Log[2,n-4^j]}];tab=Append[tab,r],{n,1,70}];Print[tab]

A271824 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with (x+2*y)^2 + 8*z^2 + 40*w^2 a square, where x is a positive integer and y,z,w are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 14 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 9, 11, 15, 23, 33, 71, 129, 167, 187, 473, 4^k*m (k = 0,1,2,... and m = 1, 22, 38, 278). Also, any positive integer can be written as x^2 + y^2 + z^2 + w^2 with 9*(x+2*y)^2 + 16*z^2 + 24*w^2 a square, where x is a positive integer and y,z,w are nonnegative integers.
(ii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and (a*x-b*y)^2 + c*z^2 + d*w^2 a square, provided that (a,b,c,d) is among the quadruples (4,8,1,8), (12,24,1,24), (2,4,5,40), (3,6,7,9), (3,9,7,9), (3,6,7,63), (1,2,8,16), (1,2,8,40), (3,6,8,40), (2,6,9,12), (3,5,9,15), (4,8,9,16), (12,24,9,16), (3,6,15,25), (3,6,16,24), (3,12,16,24), (6,9,16,24), (9,12,16,24), (4,8,16,41), (8,12,16,41), (3,6,16,48), (6,9,16,48), (2,3,16,56), (3,6,28,63), (2,4,36,45), (6,12,40,45), (7,14,56,64) and (2,6,57,60).
(iii) Let a and be positive integers with a <= b and gcd(a,b) squarefree. Then any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and (a*x+b*y)*z a square, if and only if (a,b) is among the ordered pairs (1,1), (1,2), (1,3), (2,5), (3,3), (3,6), (3,15), (5,6), (5,11), (5,13), (6,15), (8,46) and (9,23).
(iv) Let a and b be positive integers with a <= b and gcd(a,b) squarefree. Then, any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and (a*x^2+b*y^2)*z a square, if and only if (a,b) is among the ordered pairs (3,13), (5,11), (15,57), (15,165) and (138,150).
There are many ordered pairs (a,b) of integers with gcd(a,b) squarefree such that any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w integers and a*x^2 + b*y^2 a square. For example, we have shown that (1,-1), (2,-2), (3,-3) and (1,2) are indeed such ordered pairs.
See also A271510, A271513, A271518, A271665, A271714, A271721, A271724, A271775 and A271778 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(9) = 1 since 9 = 3^2 + 0^2 + 0^2 + 0^2 with (3+2*0)^2 + 8*0^2 + 40*02 = 3^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 3^2 + 0^2 with (1+2*1)^2 + 8*3^2 + 40*0^2 = 9^2.
a(15) = 1 since 15 = 1^2 + 3^2 + 2^2 + 1^2 with (1+2*3)^2 + 8*2^2 + 40*1^2 = 11^2.
a(22) = 1 since 22 = 3^2 + 2^2 + 3^2 + 0^2 with (3+2*2)^2 + 8*3^2 + 40*0^2 = 11^2.
a(23) = 1 since 23 = 1^2 + 3^2 + 2^2 + 3^2 with (1+2*3)^2 + 8*2^2 + 40*3^2 = 21^2.
a(33) = 1 since 33 = 4^2 + 1^2 + 0^2 + 4^2 with (4+2*1)^2 + 8*0^2 + 40*4^2 = 26^2.
a(38) = 1 since 38 = 5^2 + 2^2 + 0^2 + 3^2 with (5+2*2)^2 + 8*0^2 + 40*3^2 = 21^2.
a(71) = 1 since 71 = 1^2 + 6^2 + 5^2 + 3^2 since (1+2*6)^2 + 8*5^2 + 40*3^2 = 27^2.
a(129) = 1 since 129 = 5^2 + 6^2 + 8^2 + 2^2 with (5+2*6)^2 + 8*8^2 + 40*2^2 = 31^2.
a(167) = 1 since 167 = 11^2 + 1^2 + 3^2 + 6^2 with (11+2*1)^2 + 8*3^2 + 40*6^2 = 41^2.
a(187) = 1 since 187 = 3^2 + 5^2 + 12^2 + 3^2 with (3+2*5)^2 + 8*12^2 + 40*3^2 = 41^2.
a(278) = 1 since 278 = 3^2 + 0^2 + 10^2 + 13^2 with (3+2*0)^2 + 8*10^2 + 40*13^2 = 87^2.
a(473) = 1 since 473 = 7^2 + 10^2 + 0^2 + 18^2 with (7+2*10)^2 + 8*0^2 + 40*18^2 = 117^2.
		

Crossrefs

Programs

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

A303338 Number of ways to write n as x^2 + 2*y^2 + 3*2^z + 4^w with x,y,z,w nonnegative integers.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 3, 3, 2, 4, 3, 2, 6, 2, 4, 8, 2, 4, 7, 3, 4, 8, 5, 5, 10, 6, 4, 10, 8, 5, 12, 7, 3, 12, 4, 5, 12, 5, 5, 14, 7, 4, 12, 7, 6, 12, 6, 6, 10, 7, 7, 12, 7, 6, 14, 6, 8, 16, 4, 8, 18, 5, 6, 16, 5, 9, 13, 7, 7, 14
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 22 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3.
This is stronger than the author's previous conjecture in A302983. It has been verified that a(n) > 0 for all n = 4..10^9.
Jiao-Min Lin (a student at Nanjing University) has found a counterexample to the conjecture: a(12558941213) = 0. - Zhi-Wei Sun, Jul 30 2022

Examples

			a(4) = 1 with 4 = 0^2 + 2*0^2 + 3*2^0 + 4^0.
a(5) = 1 with 5 = 1^2 + 2*0^2 + 3*2^0 + 4^0.
a(6) = 1 with 6 = 0^2 + 2*1^2 + 3*2^0 + 4^0.
a(9) = 2 with 9 = 0^2 + 2*1^2 + 3*2^0 + 4^1 = 0^2 + 2*1^2 + 3*2^1 + 4^0.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n];
    g[n_]:=g[n]=Sum[Boole[MemberQ[{5,7},Mod[Part[Part[f[n],i],1],8]]&&Mod[Part[Part[f[n],i],2],2]==1],{i,1,Length[f[n]]}]==0;
    QQ[n_]:=QQ[n]=(n==0)||(n>0&&g[n]);
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    tab={};Do[r=0;Do[If[QQ[n-3*2^k-4^j],Do[If[SQ[n-3*2^k-4^j-2x^2],r=r+1],{x,0,Sqrt[(n-3*2^k-4^j)/2]}]],{k,0,Log[2,n/3]},{j,0,If[3*2^k==n,-1,Log[4,n-3*2^k]]}];tab=Append[tab,r],{n,1,70}];Print[tab]

A262357 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w^2*x^2 + 5*x^2*y^2 + 80*y^2*z^2 + 20*z^2*w^2 a square, where w is a positive integer and x,y,z are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 17 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m (k = 0,1,2,... and m = 1, 3, 11, 43, 547, 763, 1739, 6783).
(ii) For each quadruples (a,b,c,d) = (1,3,78,27), (1,3,222,75), (4,12,81,108), (6,27,25,75), (7,21,112,32), any positive integer can be written as w^2 + x^2 + y^2 + z^2 with a*w^2*x^2 + b*x^2*y^2 + c*y^2*z^2 + d*z^2*w^2 a square, where w is a positive integer and x,y,z are integers.
(iii) Each n = 0,1,2,.... can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that w^2*x^2 + 4*x^2*y^2 + 44*y^2*z^2 + 16*z^2*w^2 = 5*t^2 for some integer t.
See also A268507, A269400, A271510, A271513, A271518, A271665, A271714, A271721, A271724, A271775, A271778 and A271824 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1 > 0 and 1^2*0^2 + 5*0^2*0^2 + 80*0^2*0^2 + 20*0^2*1^2 = 0^2.
a(2) = 2 since 2 = 1^2 + 0^2 + 1^2 + 0^2 with 1 > 0 and 1^2*0^2 + 5*0^2*1^2 + 80*1^2*0^2 + 20*0^2*1^2 = 0^2, and also 2 = 1^2 + 1^2 + 0^2 + 0^2 with 1 > 0 and 1^2*1^2 + 5*1^2*0^2 + 80*0^2*0^2 + 20*0^2*1^2 = 1^2.
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1 > 0 and 1^2*0^2 + 5*0^2*1^2 + 80*1^2*1^2 + 20*1^2*1^2 = 10^2.
a(11) = 1 since 11 = 1^2 + 0^2 + 1^2 + 3^2 with 1 > 0 and
1^2*0^2 + 5*0^2*1^2 + 80*1^2*3^2 + 20*3^2*1^2 = 30^2.
a(43) = 1 since 43 = 3^2 + 0^2 + 3^2 + 5^2 with 3 > 0 and 3*0^2 + 5*0^2*3^2 + 80*3^2*5^2 + 20*5^2*3^2 = 150^2.
a(547) = 1 since 547 = 3^2 + 0^2 + 3^2 + 23^2 with 3 > 0 and 3^2*0^2 + 5*0^2*3^2 + 80*3^2*23^2 + 20*23^2*3^2 = 690^2.
a(763) = 1 since 763 = 13^2 + 20^2 + 13^2 + 5^2 with 13 > 0 and 13^2*20^2 + 5*20^2*13^2 + 80*13^2*5^2 + 20*5^2*13^2 = 910^2.
a(1739) = 1 since 1739 = 15^2 + 16^2 + 27^2 + 23^2 with 15 > 0 and 15^2*16^2 + 5*16^2*27^2 + 80*27^2*23^2 + 20*23^2*15^2 = 5850^2.
a(6783) = 1 since 6783 = 17^2 + 73^2 + 18^2 + 29^2 with 17 > 0 and 17^2*73^2 + 5*73^2*18^2 + 80*18^2*29^2 + 20*29^2*17^2 = 6069^2.
		

Crossrefs

Programs

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

A268507 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w > 0, w >= x <= y <= z such that x^2*y^2 + y^2*z^2 + z^2*x^2 is a square, where w,x,y,z are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 16 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 2^k, 4^k*m (k = 0,1,2,... and m = 3, 7, 23, 31, 39, 47, 55, 71, 79, 151, 191, 551).
(ii) For each triple (a,b,c) = (1,4,4), (1,4,16), (1,4,26), (1,4,31), (1,4,34), (1,9,9), (1,9,11), (1,9,17), (1,9,21), (1,9,27), (1,9,33), (1,9,41), (1,18,24), (1,36,44), (3,4,8), (4,6,9), (4,8,19), (4,8,27), (4,9,36), (4,16,41), (4,19,29), (5,9,25), (7,9,33), (7,25,49), (9,10,45), (9,12,28), (9,16,36), (9,21,49), (9,24,37), (9,25,27), (9,25,45), (9,30,40), (9,32,64), (9,34,36), (9,44,61), (14,25,40), (16,17,36), (16,20,25), (24,36,39), (25,40,64), (25,45,51), (27,36,37), (28,44,49), (32,49,64), (36,43,45), (36,54,58), any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that a*x^2*y^2 + b*y^2*z^2 + c*z^2*x^2 is a square.
See also A269400, A271510, A271513, A271518, A271665, A271714, A271721, A271724, A271775, A271778 and A271824 for other conjectures refining Lagrange's four-square theorem.
The author has proved in arXiv:1604.06723 that a(n) > 0 for any positive integer n. - Zhi-Wei Sun, May 09 2016

Examples

			a(2) = 1 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 > 0 = 0 < 1 and 0^2*0^2 + 0^2*1^2 + 1^2*0^2 = 0^2.
a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1 > 0 < 1 = 1 and 0^2*1^2 + 1^2*1^2 + 1^2*0^2 = 1^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 = 1 = 1 < 2 and 1^2*1^2 + 1^2*2^2 + 2^2*1^2 = 3^2.
a(23) = 1 since 23 = 3^2 + 1^2 + 2^2 + 3^2 with 3 > 1 < 2 < 3 and 1^2*2^2 + 2^2*3^2 + 3^2*1^2 = 7^2.
a(31) = 1 since 31 = 5^2 + 1^2 + 1^2 + 2^2 with 5 > 1 = 1 < 2 and 1^2*1^2 + 1^2*2^2 + 2^2*1^2 = 3^2.
a(39) = 1 since 39 = 5^2 + 1^2 + 2^2 + 3^2 with 5 > 1 < 2 < 3 and 1^2*2^2 + 2^2*3^2 + 3^2*1^2 = 7^2.
a(47) = 1 since 47 = 3^2 + 2^2 + 3^2 + 5^2 with 3 > 2 < 3 < 5 and 2^2*3^2 + 3^2*5^2 + 5^2*2^2 = 19^2.
a(55) = 1 since 55 = 7^2 + 1^2 + 1^2 + 2^2 with 7 > 1 = 1 < 2 and 1^2*1^2 + 1^2*2^2 + 2^2*1^2 = 3^2.
a(71) = 1 since 71 = 3^2 + 1^2 + 5^2 + 6^2 with 3 > 1 < 5 < 6 and 1^2*5^2 + 5^2*6^2 + 6^2*1^2 = 31^2.
a(79) = 1 since 79 = 5^2 + 3^2 + 3^2 + 6^2 with 5 > 3 = 3 < 6 and 3^2*3^2 + 3^2*6^2 + 6^2*3^2 = 27^2.
a(151) = 1 since 151 = 5^2 + 3^2 + 6^2 + 9^2 with 5 > 3 < 6 < 9 and 3^2*6^2 + 6^2*9^2 + 9^2*3^2 = 63^2.
a(191) = 1 since 191 = 3^2 + 1^2 + 9^2 + 10^2 with 3 > 1 < 9 < 10 and 1^2*9^2 + 9^2*10^2 + 10^2*1^2 = 91^2.
a(551) = 1 since 551 = 15^2 + 3^2 + 11^2 + 14^2 with 15 > 3 < 11 < 14 and 3^2*11^2 + 11^2*14^2 + 14^2*3^2 = 163^2.
		

Crossrefs

Programs

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

A269400 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with 6*w^2*x^2 + 12*x^2*y^2 + 52*y^2*z^2 + 27*z^2*w^2 a square, where w,x,y are nonnegative integers and z is a positive integer.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 16 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 3, 15, 31, 39, 71, 79, 195, 311, 319, 403, 559, 591, 683, 719, 1031, 1439, 1643, 2519, 6879, 2^k, 2^(2k+1)*39 (k = 0,1,2,...). Also, any positive integer can be written as w^2 + x^2 + y^2 + z^2 with x a positive integer and w,y,z nonnegative integer such that 6*w^2*x^2 + 12*x^2*y^2 + 52*y^2*z^2 + 27*z^2*w^2 is a square.
(ii) For each triple (a,b,c) = (1,3,2), (1,11,9), (1,14,4),(1,20,25), (1,27,18), (1,36,9), (1,56,4), (4,32,25), (9,15,25), (9,35,25), (25,8,64), (25,15,54), (25,32,28), (25,35,49), (28,32,49), any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z integers such that a*w^2*x^2 + b*x^2*y^2 + c*y^2*z^2 is a square.
See also A268507, A271510, A271513, A271518, A271665, A271714, A271721, A271724, A271775, A271778 and A271824 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(1) = 1 since 1 = 0^2 + 0^2 + 0^2 + 1^2 with 1 > 0 and 6*0^2*0^2 + 12*0^2*0^2 + 52*0^2*1^2 + 27*1^2*0^2 = 0^2.
a(2) = 1 since 2 = 0^2 + 1^2 + 0^2 + 1^2 with 1 > 0 and 6*0^2*1^2 + 12*1^2*0^2 + 52*0^2*1^2 + 27*1^2*0^2 = 0^2.
a(3) = 1 since 3 = 0^2 + 1^2 + 1^2 + 1^2 with 1 > 0 and 6*0^2*1^2 + 12*1^2*1^2 + 52*1^2*1^2 + 27*1^2*0^2 = 8^2.
a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + 1^2 with 1 > 0 and 6*2^2*3^2 + 12*3^2*1^2 + 52*1^2*1^2 = 22^2.
a(31) = 1 since 31 = 1^2 + 1^2 + 2^2 + 5^2 with 5 > 0 and 6*1^2*1^2 + 12*1^2*2^2 + 52*2^2*5^2 + 27*5^2*1^2 = 77^2.
a(39) = 1 since 39 = 2^2 + 1^2 + 5^2 + 3^2 with 3 > 0 and 6*2^2*1^2 + 12*1^2*5^2 + 52*5^2*3^2 + 27*3^2*2^2 = 114^2.
a(71) = 1 since 71 = 3^2 + 1^2 + 6^2 + 5^2 with 5 > 0 and 6*3^2*1^2 + 12*1^2*6^2 + 52*6^2*5^2 + 27*5^2*3^2 = 231^2.
a(78) = 1 since 78 = 2^2 + 7^2 + 4^2 + 3^2 with 3 > 0 and 6*2^2*7^2 + 12*7^2*4^2 + 52*7^2*4^2 + 27*3^2*2^2 = 138^2.
a(79) = 1 since 79 = 2^2 + 5^2 + 7^2 + 1^2 with 1 > 0 and 6*2^2*5^2 + 12*5^2*7^2 + 52*7^2*1^2 + 27*1^2*2^2 = 134^2.
a(195) = 1 since 195 = 3^2 + 7^2 + 4^2 + 11^2 with 11 > 0 and 6*3^2*7^2 + 12*7^2*4^2 + 52*4^2*11^2 + 27*11^2*3^2 = 377^2.
a(311) = 1 since 311 = 14^2 + 9^2 + 3^2 + 5^2 with 5 > 0 and 6*14^2*9^2 + 12*9^2*3^2 + 52*3^2*5^2 + 27*5^2*14^2 = 498^2.
a(319) = 1 since 319 = 6^2 + 3^2 + 7^2 + 15^2 with 15 > 0 and 6*6^2*3^2 + 12*3^2*7^2 + 52*7^2*15^2 + 27*15^2*6^2 = 894^2.
a(403) = 1 since 403 = 3^2 + 13^2 + 12^2 + 9^2 with 9 > 0 and 6*3^2*13^2 + 12*13^2*12^2 + 52*12^2*9^2 + 27*9^2*3^2 = 963^2.
a(559) = 1 since 559 = 5^2 + 23^2 + 2^2 + 1^2 with 1 > 0 and 6*5^2*23^2 + 12*23^2*2^2 + 52*2^2*1^2 + 27*1^2*5^2 = 325^2.
a(591) = 1 since 591 = 21^2 + 11^2 + 2^2 + 5^2 with 5 > 0 and 6*21^2*11^2 + 12*11^2*2^2 + 52*2^2*5^2 + 27*5^2*21^2 = 793^2.
a(683) = 1 since 683 = 0^2 + 11^2 + 21^2 + 11^2 with 11 > 0 and 6*0^2*11^2 + 12*11^2*21^2 + 52*21^2*11^2 + 27*11^2*0^2 = 1848^2.
a(719) = 1 since 719 = 10^2 + 3^2 + 21^2 + 13^2 with 13 > 0 and 6*10^2*3^2 + 12*3^2*21^2 + 52*21^2*13^2 + 27*13^2*10^2 = 2094^2.
a(1031) = 1 since 1031 = 26^2 + 15^2 + 9^2 + 7^2 with 7 > 0 and 6*26^2*15^2 + 12*15^2*9^2 + 52*9^2*7^2 + 27*7^2*26^2 = 1494^2.
a(1439) = 1 since 1439 = 13^2 + 27^2 + 10^2 + 21^2 with 21 > 0 and 6*13^2*27^2 + 12*27^2*10^2 + 52*10^2*21^2 + 27*21^2*13^2 = 2433^2.
a(1643) = 1 since 1643 = 36^2 + 17^2 + 3^2 + 7^2 with 7 > 0 and 6*36^2*17^2 + 12*17^2*3^2 + 52*3^2*7^2 + 27*7^2*36^2 = 2004^2.
a(2519) = 1 since 2519 = 27^2 + 7^2 + 30^2 + 29^2 with 29 > 0 and 6*27^2*7^2 + 12*7^2*30^2 + 52*30^2*29^2 + 27*29^2*27^2 = 7527^2.
a(6879) = 1 since 6879 = 38^2 + 53^2 + 49^2 + 15^2 with 15 > 0 and 6*38^2*53^2 + 12*53^2*49^2 + 52*49^2*15^2 + 27*15^2*38^2 = 11922^2.
		

Crossrefs

Programs

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

A299537 Number of ways to write n^2 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 power of 4 (including 4^0 = 1) and x + 3*y is also a power of 4.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 04 2018

Keywords

Comments

Conjecture (i): a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*m with k = 0,1,2,... and m = 1, 2, 3, 5, 7, 11, 15, 19, 43, 47, 135, 1103.
Conjecture (ii): For any integer n > 1, we can write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2*x or 2*y is a power of 4 and 2*(x+3*y) is also a power of 4.
Note that 81503^2 cannot be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and both x and x + 3*y in the set {4^k: k = 0,1,2,...}. However, 81503^2 = 16372^2 + 4^2 + 52372^2 + 60265^2 with 4 = 4^1 and 16372 + 3*4 = 4^7.
We have verified that the conjecture for n up to 10^7.
See also the related comments in A300219 and A300360, and a similar conjecture in A299794.

Examples

			a(2) = 1 since 2^2 = 1^2 + 1^2 + 1^2 + 1^2 with 1 = 4^0 and 1 + 3*1 = 4^1.
a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4 = 4^1 and 4 + 3*0 = 4^1.
a(19) = 1 since 19^2 = 1^2 + 0^2 + 6^2 + 18^2 with 1 = 4^0 and 1 + 3*0 = 4^0.
a(43) = 1 since 43^2 = 4^2 + 20^2 + 8^2 + 37^2 with 4 = 4^1 and 4 + 3*20 = 4^3.
a(135) = 1 since 135^2 = 16^2 + 16^2 + 17^2 + 132^2 with 16 = 4^2 and 16 + 3*16 = 4^3.
a(1103) = 1 since 1103^2 = 4^2 + 4^2 + 716^2 + 839^2 with 4 = 4^1 and 4 + 3*4 = 4^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Pow[n_]:=Pow[n]=IntegerQ[Log[4,n]];
    tab={};Do[r=0;Do[If[(Pow[y]||Pow[4^k-3y])&&SQ[n^2-y^2-(4^k-3y)^2-z^2],r=r+1],{k,0,Log[4,Sqrt[10]*n]},{y,0,Min[n,4^k/3]},{z,0,Sqrt[Max[0,(n^2-y^2-(4^k-3y)^2)/2]]}];tab=Append[tab,r],{n,1,80}];Print[tab]
Previous Showing 11-20 of 140 results. Next