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-10 of 140 results. Next

A276533 Least prime p with A271518(p) = n.

Original entry on oeis.org

5, 2, 19, 127, 17, 67, 163, 41, 89, 101, 131, 313, 257, 211, 227, 461, 241, 401, 613, 337, 433, 353, 577, 467, 863, 887, 617, 787, 601, 569, 761, 641, 823, 673, 857, 1217, 881, 1091, 1289, 977, 1427, 1097, 1801, 929, 1153, 953, 1321, 1049, 1747, 1409
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 12 2016

Keywords

Comments

Conjecture: a(n) exists for any positive integer n.
In contrast, it is known that for each prime p the number of ordered integral solutions to the equation x^2 + y^2 + z^2 + w^2 = p is 8*(p+1).
In 1998 J. Friedlander and H. Iwaniec proved that there are infinitely many primes p of the form w^2 + x^4 = w^2 + (x^2)^2 + 0^2 + 0^2 with w and x nonnegative integers. Since x^2 + 3*0 + 5*0 is a square, we see that A271518(p) > 0 for infinitely many primes p.

Examples

			a(1) = 5 since 5 is the first prime which can be written in a unique way as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integer and x + 3*y + 5*z a square; in fact, 5 = 1^2 + 0^2 + 0^2 + 2^2 with 1 + 3*0 + 5*0 = 1^2.
a(2) = 2 since 2 = 1^2 + 0^2 + 0^2 + 1^2 with 1 + 3*0 + 5*0 = 1^2, and 2 = 1^2 + 1^2 + 0^2 + 0^2 with 1 + 3*1 + 5*0 = 2^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[m=0;Label[aa];m=m+1;r=0;Do[If[SQ[Prime[m]-x^2-y^2-z^2]&&SQ[x+3y+5z],r=r+1;If[r>n,Goto[aa]]],{x,0,Sqrt[Prime[m]]},{y,0,Sqrt[Prime[m]-x^2]},{z,0,Sqrt[Prime[m]-x^2-y^2]}];If[r
    				

A271510 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x >= y >= 0, z >= 0 and w >= 0 such that x^2 + 8*y^2 + 16*z^2 is a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 09 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 7, 23, 71, 77, 105, 191, 215, 311, 335, 2903, 4^k*q (k = 0,1,2,... and q = 6, 15, 47, 138).
(ii) Any natural number can be written as x^2 + y^2 + z^2 + w^2 with x >= y >= 0, z >=0 and w >= 0 such that 4*x^2 + 21*y^2 + 24*z^2 (or 5*x^2 + 40*y^2 + 4*z^2, 20*x^2 + 85*y^2 +16*z^2, 25*x^2 + 480*y^2 + 96*z^2, 36*x^2 + 45*y^2 + 40*z^2, 40*x^2 + 72*y^2 + 9*z^2) is a square.
(iii) For any ordered pair (b, c) = (48, 112), (63, 7), (112, 1008), (136, 24), (136, 216), (360, 40), (840, 280), (1008, 112), each natural number can be written as x^2 + y^2 + z^2 + w^2 with x >= y >= 0, z >=0 and w >= 0 such that 9*x^2 + b*y^2 + c*z^2 is a square.
(iv) For any ordered pair (b, c) = (80, 25), (81, 48), (144, 9), (144, 153), (177, 48), each natural number can be written as x^2 + y^2 + z^2 + w^2 with x >= y >= 0, z >=0 and w >= 0 such that 16*x^2 + b*y^2 + c*z^2 is a square.
This conjecture is much stronger than Lagrange's four-square theorem. It is apparent that a(m^2*n) >= a(n) for all m,n = 1,2,3,....
See also A271513 and A271518 for related conjectures.
Conjectures (i), including the "a(n) = 1" part, (ii), (iii), and (iv) have been verified for n <= 10^9. - Mauro Fiorentini, Jun 19 2024

Examples

			a(6) = 1 since 6 = 1^2 + 1^2 + 0^2 + 2^2 with 1 = 1 and 1^2 + 8*1^2 + 16*0^2 = 3^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 = 1 and 1^2 + 8*1^2 + 16*1^2 = 5^2.
a(15) = 1 since 15 = 3^2 + 1^2 + 2^2 + 1^2 with 3 > 1 and 3^2 + 8*1^2 + 16*2^2 = 9^2.
a(23) = 1 since 23 = 3^2 + 1^2 + 2^2 + 3^2 with 3 > 1 and 3^2 + 8*1^2 + 16*2^2 = 9^2.
a(47) = 1 since 47 = 3^2 + 2^2 + 5^2 + 3^2 with 3 > 2 and 3^2 + 8*2^2 + 16*5^2 = 21^2.
a(71) = 1 since 71 = 7^2 + 2^2 + 3^2 + 3^2 with 7 > 2 and 7^2 + 8*2^2 + 16*3^2 = 15^2.
a(77) = 1 since 77 = 5^2 + 4^2 + 6^2 + 0^2 with 5 > 4 and 5^2 + 8*4^2 + 16*6^2 = 27^2.
a(105) = 1 since 105 = 6^2 + 2^2 + 4^2 + 7^2 with 6 > 2 and 6^2 + 8*2^2 + 16*4^2 = 18^2.
a(138) = 1 since 138 = 3^2 + 2^2 + 5^2 + 10^2 with 3 > 2 and 3^2 + 8*2^2 + 16*5^2 = 21^2.
a(191) = 1 since 191 = 9^2 + 3^2 + 1^2 + 10^2 with 9 > 3 and 9^2 + 8*3^2 + 16*1^2 = 13^2.
a(215) = 1 since 215 = 11^2 + 7^2 + 6^2 + 3^2 with 11 > 7 and 11^2 + 8*7^2 + 16*6^2 = 33^2.
a(311) = 1 since 311 = 15^2 + 6^2 + 1^2 + 7^2 with 15 > 6 and 15^2 + 8*6^2 + 16*1^2 = 23^2.
a(335) = 1 since 335 = 17^2 + 1^2 + 3^2 + 6^2 with 17 > 1 and 17^2 + 8*1^2 + 16*3^2 = 21^2.
a(2903) = 1 since 2903 = 49^2 + 14^2 + 15^2 + 9^2 with 49 > 14 and 49^2 + 8*14^2 + 16*15^2 = 87^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+8y^2+16z^2],r=r+1],{y,0,Sqrt[n/2]},{x,y,Sqrt[n-y^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Continue,{n,0,80}]

A271513 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with 3*x^2 + 4*y^2 + 9*z^2 a square, where w, x, y and z are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 09 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 11, 23, 43, 47, 67, 83, 107, 155, 323, 683, 803, 4^k*m (k = 0,1,2,... and m = 22, 38). [Conjecture verified for all natural numbers up to 10^9. - Mauro Fiorentini, Jul 04 2024]
(ii) Any natural number can be written as w^2 + x^2 + y^2 + z^2 with x, y, z integers and a*x^2 + b*y^2 + c*z^2 a square, whenever (a,b,c) is among the following triples: (1,3,12), (1,3,18), (1,3,21), (1,3,60), (1,5,15), (1,8,24), (1,12,15), (1,24,56), (1,24,72), (1,48,72), (1,48,168), (1,120,180), (1,192,288), (1,280,560), (3,9,13), (4,5,12), (4,5,60), (4,9,60), (4,12,21), (4,12,45), (4,12,69), (4,12,93), (4,12,237), (4,21,24), (4,21,36), (4,21,504), (4,24,93), (4,28,77), (4,45,120), (4,45,540), (4,45,600), (5,36,40), (7,9,126), (7,9,588), (8,16,73), (8,16,97), (8,49,112), (9,13,27), (9,16,24), (9,19,36), (9,21,91), (9,24,232), (9,28,63), (9,40,45), (9,40,56), (9,40,120), (9,45,115),(9,45,235), (12,13,24), (12,13,36), (12,36,37), (12,36,133), (13,36,72), (13,36,108), (15,24,25), (15,49,105), (16,17,48), (16,20,45), (16,21,84), (16,33,72), (16,33,176), (16,45,180), (16,48,57), (16,48,105), (16,48,233), (16,48,249), (19,45,57), (19,45,180), (21,25,35), (21,25,75), (21,28,36), (21,28,60), (21,43,105), (21,100,105),(24,25,72), (24,25,120), (24,48,97), (24,81,184), (24,120,145), (25,36,75), (25,40,56), (25,45,51), (25,45,99), (25,48,96), (25,48,144), (25,54,90), (25,75,81), (25,80,184), (25,96,120), (25,200,216), (28,33,36), (28,36,77), (28,72,189), (32,64,73), (33,36,220), (33,48,144), (33,72,256), (33,88,144), (36,45,100), (36,45,172), (37,81,243), (40,81,120), (40,81,240), (41,64,256), (45,48,76), (48,144,177), (49,56,64), (49,63,72), (55,141,165), (57,64,192), (60,105,196), (64,65,160), (72,73,144), (81,160,240), (85,140,196), (105,112,144), (112,144,153), (136,144,153), (144,145,240), (144,160,225),(148,189,252), (175,189,225). [Conjecture verified for all triples and all natural numbers up to 10^9. - Mauro Fiorentini, Jul 04 2024]
(iii) If a, b and c are positive integers such that any natural number can be written as w^2 + x^2 + y^2 + z^2 with x, y, z integers and a*x^2 + b*y^2 + c*z^2 a square, then a, b and c cannot be pairwise coprime.
This conjecture is stronger than Lagrange's four-square theorem. Moreover, there are many other suitable triples (a,b,c) for our purpose not listed in part (ii) of the conjecture. If a, b and c are positive integers such that any natural number can be written as w^2 + x^2 + y^2 + z^2 with x, y, z integers and a*x^2 + b*y^2 + c*z^2 a square, then one of a+b+c, 4*a+b+c, a+4*b+c and a+b+4*c must be a square since 2^2 + 1^2 + 1^2 + 1^2 is the unique way to express 7 as a sum of four squares.
Obviously, a(m^2*n) >= a(n) for all m,n = 1,2,3,....
See also A271510 and A271518 for related conjectures.

Examples

			a(3) = 1 since 3 = 0^2 + 1^2 + 1^2 + 1^2 with 3*1^2 + 4*1^2 + 9*1^2 = 4^2.
a(11) = 1 since 11 = 1^2 + 3^2 + 0^2 + 1^2 with 3*3^2 + 4*0^2 + 9*1^2 = 6^2.
a(22) = 1 since 22 = 4^2 + 2^2 + 1^2 + 1^2 with 3*2^2 + 4*1^2 + 9*1^2 = 5^2.
a(23) = 1 since 23 = 3^2 + 1^2 + 2^2 + 3^2 with 3*1^2 + 4*2^2 + 9*3^2 = 10^2.
a(38) = 1 since 38 = 0^2 + 6^2 + 1^2 + 1^2 with 3*6^2 + 4*1^2 + 9*1^2 = 11^2.
a(43) = 1 since 43 = 4^2 + 3^2 + 3^2 + 3^2 with 3*3^2 + 4*3^2 + 9*3^2 = 12^2.
a(47) = 1 since 47 = 3^2 + 6^2 + 1^2 + 1^2 with 3*6^2 + 4*1^2 + 9*1^2 = 11^2.
a(67) = 1 since 67 = 8^2 + 1^2 + 1^2 + 1^2 with 3*1^2 + 4*1^2 + 9*1^2 = 4^2.
a(83) = 1 since 83 = 0^2 + 9^2 + 1^2 + 1^2 with 3*9^2 + 4*1^2 + 9*1^2 = 16^2.
a(107) = 1 since 107 = 9^2 + 3^2 + 4^2 + 1^2 with 3*3^2 + 4*4^2 + 9*1^2 = 10^2.
a(155) = 1 since 155 = 0^2 + 9^2 + 5^2 + 7^2 with 3*9^2 + 4*5^2 + 9*7^2 = 28^2.
a(323) = 1 since 323 = 3^2 + 15^2 + 8^2 + 5^2 with 3*15^2 + 4*8^2 + 9*5^2 = 34^2.
a(683) = 1 since 683 = 15^2 + 11^2 + 16^2 + 9^2 with 3*11^2 + 4*16^2 + 9*9^2 = 46^2.
a(803) = 1 since 803 = 24^2 + 13^2 + 7^2 + 3^2 with 3*13^2 + 4*7^2 + 9*3^2 = 28^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[3x^2+4y^2+9z^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}]

A271608 Number of ordered ways to write n as pen(u) + pen(v) + pen(x) + pen(y) + pen(z) with u,v,x,y,z nonnegative integers such that u + 2*v + 4*x + 5*y + 6*z is a pentagonal number, where pen(k) denotes the pentagonal number k*(3k-1)/2.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 10 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 2, 4, 5, 7, 9, 21, 22, 43. Also, every n = 0,1,2,... can be written as pen(u) + pen(v) + pen(x) + pen(y) + pen(z) with u,v,x,y,z nonnegative integers such that 3*u + 5*v + 11*x + 16*y + 19*z is also a pentagonal number.
(ii) Any integer n > 43 can be written as the sum of five pentagonal numbers u, v, x, y and z such that u + 2*v + 5*x + 7*y + 10*z is also a pentagonal number. Also, each integer n > 10 can be written as the sum of five pentagonal numbers u, v, x, y and z such that u + 2*v + 5*x + 7*y + 10*z is a square.
(iii) Any natural number n can be written as u^2 + v^2 + x^2 + y^2 + z^2 with u^2 + 2*v^2 + 3*x^2 + 4*y^2 + 5*z^2 a square, where u, v, x, y and z are integers.
As conjectured by Fermat and proved by Cauchy, each natural number can be written as the sum of five pentagonal numbers.
See also A271510, A271513, A271518 and A271644 for some similar conjectures refining Lagrange's four-square theorem.

Examples

			a(7) = 1 since 7 = 5 + 0 + 1 + 0 + 1 = pen(2) + pen(0) + pen(1) + pen(0) + pen(1) with 2 + 2*0 + 4*1 + 5*0 + 6*1 = 12 = pen(3).
a(9) = 1 since 9 = 1 + 1 + 5 + 1 + 1 = pen(1) + pen(1) + pen(2) + pen(1) + pen(1) with 1 + 2*1 + 4*2 + 5*1 + 6*1 = 22 = pen(4).
a(22) = 1 since 22 = 0 + 0 + 5 + 12 + 5 = pen(0) + pen(0) + pen(2) + pen(3) + pen(2) with 0 + 2*0 + 4*2 + 5*3 + 6*2 = 35 = pen(5).
a(43) = 1 since 43 = 5 + 1 + 35 + 1 + 1 = pen(2) + pen(1) + pen(5) + pen(1) + pen(1) with 2 + 2*1 + 4*5 + 5*1 + 6*1 = 35 = pen(5).
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    pen[x_]:=pen[x]=x*(3x-1)/2
    pQ[n_]:=pQ[n]=SQ[24n+1]&&(n==0||Mod[Sqrt[24n+1]+1,6]==0)
    Do[r=0;Do[If[pQ[n-pen[x]-pen[y]-pen[z]-pen[w]]&&pQ[x+2y+4z+5w+6*Floor[(Sqrt[24(n-pen[x]-pen[y]-pen[z]-pen[w])+1]+1)/6]],r=r+1],{x,0,(Sqrt[24n+1]+1)/6},{y,0,(Sqrt[24(n-pen[x])+1]+1)/6},{z,0,(Sqrt[24(n-pen[x]-pen[y])+1]+1)/6},{w,0,(Sqrt[24(n-pen[x]-pen[y]-pen[z])+1]+1)/6}];Print[n," ",r];Label[aa];Continue,{n,0,70}]

A271714 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 such that (10*w+5*x)^2 + (12*y+36*z)^2 is a square, where w is a positive integer and x,y,z are nonnegative integers.

Original entry on oeis.org

1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 2, 1, 3, 1, 2, 1, 2, 3, 1, 4, 4, 2, 2, 1, 3, 3, 5, 2, 2, 5, 2, 1, 2, 3, 3, 3, 2, 3, 2, 3, 4, 4, 2, 3, 9, 2, 3, 1, 1, 6, 2, 3, 4, 6, 4, 1, 2, 5, 3, 3, 4, 3, 5, 1, 4, 5, 1, 3, 6, 6, 1, 3, 4, 5, 12, 2, 4, 6, 2, 4
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 12 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 7, 9, 19, 49, 133, 589, 2^k, 2^k*3, 4^k*q (k = 0,1,2,... and q = 14, 67, 71, 199).
(ii) If P(y,z) is one of 2y-3z, 2y-8z and 4y-6z, then any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers such that (w-x)^2 + P(y,z)^2 is a square.
(iii) For each triple (a,b,c) = (1,4,4), (1,12,12), (2,4,8), (2,6,6), (2,12,12), (3,4,4), (3,4,8), (3,8,8), (3,12,12), (3,12,36), (5,4,4), (5,4,8), (5,8,16), (5,36,36), (6,4,4), (7,12,12), (7,20,20), (7,24,24), (9,4,4), (9,12,12),(9,36,36), (11,12,12), (13,4,4), (15,12,12), (16,12,12), (21,20,20), (21,24,24), (23,12,12), any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers such that (w+a*x)^2 + (b*y-c*z)^2 is a square.
See also A271510, A271513, A271518, A271644, A271665, A271721 and A271724 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(2) = 1 since 2 = 1^2 + 1^2 + 0^2 + 0^2 with (10*1+5*1)^2 + (12*0+36*0)^2 = 15^2 + 0^2 = 15^2.
a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with (10*1+5*1)^2 + (12*0+36*1)^2 = 15^2 + 36^2 = 39^2.
a(4) = 1 since 4 = 2^2 + 0^2 + 0^2 + 0^2 with (10*2+5*0)^2 + (12*0+36*0)^2 = 20^2 + 0^2 = 20^2.
a(6) = 1 since 6 = 2^2 + 0^2 + 1^2 + 1^2 with (10*2+5*0)^2 + (12*1+36*1)^2 = 20^2 + 48^2 = 52^2.
a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with (10*1+5*2)^2 + (12*1+36*1)^2 = 20^2 + 48^2 = 52^2.
a(9) = 1 since 9 = 3^2 + 0^2 + 0^2 + 0^2 with (10*3+5*0)^2 + (12*0+36*0)^2 = 30^2 + 0^2 = 30^2.
a(19) = 1 since 19 = 3^2 + 0^2 + 3^2 + 1^2 with (10*3+5*0)^2 + (12*3+36*1)^2 = 30^2 + 72^2 = 78^2.
a(49) = 1 since 49 = 7^2 + 0^2 + 0^2 + 0^2 with (10*7+5*0)^2 + (12*0+36*0)^2 = 70^2 + 0^2 = 70^2.
a(133) = 1 since 133 = 9^2 + 0^2 + 6^2 + 4^2 with (10*9+5*0)^2 + (12*6+36*4)^2 = 90^2 + 216^2 = 234^2.
a(589) = 1 since 589 = 17^2 + 10^2 + 2^2 + 14^2 with (10*17+5*10)^2 + (12*2+36*14)^2 = 220^2 + 528^2 = 572^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[(10*Sqrt[n-x^2-y^2-z^2]+5x)^2+(12y+36z)^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,80}]

A271665 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 such that w^2 + 4*x*y + 8*y*z + 32*z*x is a square, where w is a positive integer and x,y,z are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 12 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 4^k*3^m, 4^k*3^m*43, 4^k*9^m*q (k,m = 0, 1, 2, ... and q = 7, 15, 79, 95, 141, 159, 183).
(ii) Any positive integer n can be written as w^2 + x^2 + y^2 + z^2 with w*x + x*y + 2*y*z + 3*z*x (or w*x + 3*x*y + 8*y*z + 5*z*x) twice a square, where w is a positive integer and x,y,z are nonnegative integers.
(iii) For each k = 1, 2, 8, any positive integer can be written as w^2 + x^2 + y^2 + z^2 with w^2 + k*(x*y+y*z) a square, where w is a positive integer and x,y,z are nonnegative integers.
(iv) For each ordered pair (b,c) = (16,4), (24,4), (32,16), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^2 + b*y^2 + c*x*z + c*y*z + c*z*w is a square.
We also guess that for each triple (b,c,d) = (1,3,4), (1,6,8), (1,7,24), (1,8,15), (1,10,24), (1,12,35), (1,14,48), (1,20,48), (2,1,2), (2,4,2), (2,4,7), (2,6,7), (2,8,4), (2,8,14), (2,8,31), (2,10,23), (2,12,14), (2,12,34), (2,14,47), (3,1,1), (3,1,4), (3,1,16), (3,2,14), (3,2,17), (3,2,38), (3,3,3), (3,3,13), (3,4,1), (3,4,4), (3,5,11), (3,6,3), (3,6,6), (3,6,26), (3,8,2), (3,8,13), (3,8,22), (3,9,39), (3,12,12), (3,12,33), (3,15,1), any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers and x^2 + b*y^2 + c*x*z + d*y*z a square.
See also A271510, A271513, A271518 and A271644 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(3) = 1 since 3 = 1^2 + 0^2 + 1^2 + 1^2 with 1^2 + 4*0*1 + 8*1*1 + 32*1*0 = 3^2.
a(4) = 1 since 4 = 2^2 + 0^2 + 0^2 + 0^2 with 2^2 + 4*2*0 + 8*0*0 + 32*0*0 = 2^2.
a(7) = 1 since 7 = 1^2 + 2^2 + 1^2 + 1^2 with 1^2 + 4*2*1 + 8*1*1 + 32*1*2 = 9^2.
a(15) = 1 since 15 = 1^2 + 2^2 + 1^2 + 3^2 with 1^2 + 4*2*1 + 8*1*3 + 32*3*2 = 15^2.
a(43) = 1 since 43 = 3^2 + 3^2 + 4^2 + 3^2 with 3^2 + 4*3*4 + 8*4*3 + 32*3*3 = 21^2.
a(79) = 1 since 79 = 5^2 + 3^2 + 6^2 + 3^2 with 5^2 + 4*3*6 + 8*6*3 + 32*3*3 = 23^2.
a(95) = 1 since 95 = 5^2 + 6^2 + 5^2 + 3^2 with 5^2 + 4*6*5 + 8*5*3 + 32*3*6 = 29^2.
a(129) = 1 since 129 = 5^2 + 6^2 + 8^2 + 2^2 with 5^2 + 4*6*8 + 8*8*2 + 32*2*6 = 27^2.
a(141) = 1 since 141 = 8^2 + 5^2 + 4^2 + 6^2 with 8^2 + 4*5*4 + 8*4*6 + 32*6*5 = 36^2.
a(159) = 1 since 159 = 11^2 + 1^2 + 6^2 + 1^2 with 11^2 + 4*1*6 + 8*6*1 + 32*1*1 = 15^2.
a(183) = 1 since 183 = 1^2 + 9^2 + 10^2 + 1^2 with 1^2 + 4*9*10 + 8*10*1 + 32*1*9 = 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[4x*y+8*y*z+32*z*x+(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,80}]

A271724 Number of ordered ways to write n as w^2 + x^2 + y^2 + z^2 with w*(x+2*y+3*z) a square, where w,x,y,z are nonnegative integers with x > 0.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 13 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 7, 15, 47, 151, 4^k*q (k = 0,1,2,... and q = 1, 23, 71).
(ii) For positive integers a,b,c with gcd(a,b,c) squarefree, any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers and w*(a*x+b*y+c*z) a square, if and only if {a,b,c} is among {1,2,3}, {1,3,6}, {1,6,9}, {5,6,9}, {18,30,114}.
(iii) For each quadruple (a,b,c,d) = (1,1,2,12), (1,2,7,60), (1,3,9,48), (1,4,11,48), (1,5,8,24), (1,8,11,24), (2,6,8,15), (3,5,6,24), (3,6,15,40), (3,6,18,40), (3,12,15,20), (4,4,8,15), (4,8,12,21), (4,8,12,45), (4,8,20,15), (4,8,36,45), (5,10,15,24), (6,9,15,20), (7,14,28,60), (7,21,28,60), (7,21,42,60), (12,36,48,55), (14,21,28,60), (3,9,18,112), (3,21,33,80), (4,5,9,120), (4,12,16,105), any natural number can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers such that (a*x+b*y+c*z)^2 + (d*w)^2 is a square.
See also A271510, A271513, A271518, A271644, A271665, A271714 and A271721 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(1) = 1 since 1 = 0^2 + 1^2 + 0^2 + 0^2 with 1 > 0 and 0*(1+2*0+3*0) = 0^2.
a(3) = 2 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1*(1+2*0+3*1) = 2^2, and 3 = 0^2 + 1^2 + 1^2 + 1^2 with 0*(1+2*1+3*1) = 0^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1*(1+2*1+3*2) = 3^2.
a(15) = 1 since 15 = 2^2 + 3^2 + 1^2 + 1^2 with 2*(3+2*1+3*1) = 4^2.
a(23) = 1 since 23 = 1^2 + 3^2 + 2^2 + 3^2 with 1*(3+2*2+3*3) = 4^2.
a(31) = 2 since 31 = 2^2 + 1^2 + 1^2 + 5^2 with 2*(1+2*1+3*5) = 6^2, and also 31 = 2^2 + 3^2 + 3^2 + 3^2 with 2*(3+2*3+3*3) = 6^2.
a(47) = 1 since 47 = 1^2 + 1^2 + 3^2 + 6^2 with 1*(1+2*3+3*6) = 5^2.
a(71) = 1 since 71 = 1^2 + 6^2 + 5^2 + 3^2 with 1*(6+2*5+3*3) = 5^2.
a(151) = 1 since 151 = 9^2 + 6^2 + 5^2 + 3^2 with 9*(6+2*5+3*3) = 15^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[Sqrt[n-x^2-y^2-z^2](x+2y+3z)],r=r+1],{x,1,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r];Label[aa];Continue,{n,1,80}]

A271775 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 (x >= y >= z <= w) with x - y a square, where w,x,y,z are nonnegative integers.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 13 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 3, 11, 47, 2^{4k+3}*m (k = 0,1,2,... and m = 1, 3, 7, 15, 79).
(ii) 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 w,x,y,z nonnegative integers and a*x-b*y a square, if and only if (a,b) is among the ordered pairs (1,1), (2,1), (2,2), (4,3), (6,2). Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(iii) Let a and b be positive integers with 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 a square, if and only if {a,b} is among {1,2}, {1,3} and {1,24}. Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(iv) Let a,b,c be positive integers with a <= b and gcd(a,b,c) squarefree. Then, 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+b*y-c*z a square, if and only if (a,b,c) is among the triples (1,1,1), (1,1,2), (1,2,1), (1,2,2), (1,2,3), (1,3,1), (1,3,3), (1,4,4), (1,5,1), (1,6,6), (1,8,6), (1,12,4), (1,16,1), (1,17,1), (1,18,1), (2,2,2), (2,2,4), (2,3,2), (2,3,3), (2,4,1), (2,4,2), (2,6,1), (2,6,2), (2,6,6), (2,7,4), (2,7,7), (2,8,2), (2,9,2), (2,32,2), (3,3,3), (3,4,2), (3,4,3), (3,8,3), (4,5,4), (4,8,3), (4,9,4), (4,14,14), (5,8,5), (6,8,6), (6,10,8), (7,9,7), (7,18,7), (7,18,12), (8,9,8), (8,14,14), (8,18,8), (14,32,14), (16,18,16), (30,32,30), (31,32,31), (48,49,48), (48,121,48). Verified for all nonnegative integers up to 10^11. - Mauro Fiorentini, Jun 14 2024
(v) Let a,b,c be positive integers with b <= c and gcd(a,b,c) squarefree. Then, 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-b*y-c*z a square, if and only if (a,b,c) is among the triples (1,1,1), (2,1,1), (2,1,2), (3,1,2) and (4,1,2).
(vi) Let a,b,c,d be positive integers with a <= b, c <= d and gcd(a,b,c,d) squarefree. Then, 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+b*y-(c*z+d*w) a square, if and only if (a,b,c,d) is among the quadruples (1,2,1,1), (1,2,1,2), (1,3,1,2), (1,4,1,3), (2,4,1,2), (2,4,2,4), (8,16,7,8), (9,11,2,9) and (9,16,2,7).
(vii) Let a,b,c,d be positive integers with a <= b <= c and gcd(a,b,c,d) squarefree. Then, 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+b*y+c*z-d*w a square, if and only if (a,b,c,d) is among the quadruples (1,1,2,1), (1,2,3,1), (1,2,3,3), (1,2,4,2), (1,2,4,4), (1,2,5,5), (1,2,6,2), (1,2,8,1), (2,2,4,4), (2,4,6,4), (2,4,6,6), and (2,4,8,2).
It is known that any natural number not of the form 4^k*(16*m+14) (k,m = 0,1,2,...) can be written as x^2 + y^2 + 2*z^2 = x^2 + y^2 + z^2 + z^2 with x,y,z nonnegative integers.
See also A271510, A271513, A271518, A271644, A271665, A271714, A271721 and A271724 for other conjectures refining Lagrange's four-square theorem.

Examples

			a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 1^2 with 1 = 1 > 0 < 1 and 1 - 1 = 0^2.
a(7) = 1 since 7 = 1^2 + 1^2 + 1^2 + 2^2 with 1 = 1 = 1 < 2 and 1 - 1 = 0^2.
a(8) = 1 since 8 = 2^2 + 2^2 + 0^2 + 0^2 with 2 = 2 > 0 = 0 and 2 - 2 = 0^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 0^2 + 3^2 with 1 = 1 > 0 < 3 and 1 - 1 = 0^2.
a(24) = 1 since 24 = 2^2 + 2^2 + 0^2 + 4^2 with 2 = 2 > 0 < 4 and 2 - 2 = 0^2.
a(47) = 1 since 47 = 3^2 + 3^2 + 2^2 + 5^2 with 3 = 3 > 2 < 5 and 3 - 3 = 0^2.
a(53) = 2 since 53 = 3^2 + 2^2 + 2^2 + 6^2 with 3 > 2 = 2 < 6 and 3 - 2 = 1^2, and also 53 = 6^2 + 2^2 + 2^2 + 3^2 with 6 > 2 = 2 < 3 and 6 - 2 = 2^2.
a(56) = 1 since 56 = 6^2 + 2^2 + 0^2 + 4^2 with 6 > 2 > 0 < 4 and 6 - 2 = 2^2.
a(120) = 1 since 120 = 8^2 + 4^2 + 2^2 + 6^2 with 8 > 4 > 2 < 6 and 8 - 4 = 2^2.
a(632) = 1 since 632 = 16^2 + 12^2 + 6^2 + 14^2 with 16 > 12 > 6 < 14 and 16 - 12 = 2^2.
		

References

  • L. E. Dickson, Modern Elementary Theory of Numbers, University of Chicago Press, Chicago, 1939, pp. 112-113.

Crossrefs

Programs

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

A271721 Number of ordered ways to write n as x^2 + y^2 + z^2 + w^2 with x >= y >= z >= 0, x > 0 and w >= z such that (x-y)*(w-z) is a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Apr 12 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 3, 5, 11, 15, 23, 35, 95, 4^k*190 (k = 0,1,2,...).
(ii) For each k = 4, 5, 6, 7, 8, 11, 12, 13, 15, 17, 18, 20, 22, 25, 27, 29, 33, 37, 38, 41, 50, 61, any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that (x-y)*(w-k*z) is a square.
(iii) For each triple (a,b,c) = (3,1,1), (1,2,1), (2,2,1), (3,2,1), (2,2,2), (6,2,1), (1,3,1), (3,3,1), (15,3,1), (1,4,1), (2,4,1), (1,5,1), (3,5,1), (5,5,1), (1,5,2), (1,6,1), (2,6,1), (3,6,1), (15,6,1), (1,7,1), (5,7,1), (1,8,1), (1,8,5), (3,9,1), (1,10,1), (1,12,1), (1,13,1), (3,13,1), (1,14,1), (1,15,1), (1,15,2), (6,16,1), (2,18,1), (3,18,1), (1,20,2), (1,21,1), (3,21,1), (1,23,1), (1,24,1), (1,27,1), (3,27,1), (1,34,1), (1,45,1), (3,45,1), (3,48,1), (1,55,1), (1,60,1), (5,60,1), any natural number can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that a*(x+b*y)*(w-c*z) is a square.
This is stronger than Lagrange's four-square theorem. Note that for k = 2 or 3, any natural number n can be written as w^2 + x^2 + y^2 + z^2 with w,x,y,z nonnegative integers and (x-y)*(w-k*z) = 0, for, if n cannot be represented by x^2 + y^2 + 2*z^2 then it has the form 4^k*(16*m+14) (k,m = 0,1,2,...) and hence it can be represented by x^2 + y^2 + (k^2+1)*z^2. It is known that natural numbers not represented by x^2 + y^2 + 5*z^2 have the form 4^k*(8*m+3), and that positive even numbers not represented by x^2 + y^2 + 10*z^2 have the form 4^k*(16*m+6) (as conjectured by S. Ramanujan and proved by L. E. Dickson).
See also A271510, A271513, A271518, A271644, A271714 and A271724 for other conjectures refining Lagrange's theorem.

Examples

			a(3) = 1 since 3 = 1^2 + 1^2 + 0^2 + 0^2 with 1 = 1 > 0 = 0 and (1-1)*(0-0) = 0^2.
a(5) = 1 since 5 = 2^2 + 1^2 + 0^2 + 0^2 with 2 > 1 > 0 = 0 and (2-1)*(0-0) = 0^2.
a(11) = 1 since 11 = 1^2 + 1^2 + 0^2 + 3^2 with 1 = 1 > 0 < 3 and (1-1)*(3-0) = 0^2.
a(14) = 2 since 14 = 3^2 + 1^2 + 0^2 + 2^2 with 3 > 1 > 0 < 2 and (3-1)*(2-0) = 2^2, and also 14 = 3^2 + 2^2 + 0^2 + 1^2 with 3 > 2 > 0 < 1 and (3-2)*(1-0) = 1^2.
a(15) = 1 since 15 = 3^2 + 2^2 + 1^2 + 1^2 with 3 > 2 > 1 = 1 and (3-2)*(1-1) = 0^2.
a(23) = 1 since 23 = 3^2 + 3^2 + 1^2 + 2^2 with 3 = 3 > 1 < 2 and (3-3)*(2-1) = 0^2.
a(35) = 1 since 35 = 3^2 + 3^2 + 1^2 + 4^2 with 3 = 3 > 1 < 4 and (3-3)*(4-1) = 0^2.
a(95) = 1 since 95 = 5^2 + 5^2 + 3^2 + 6^2 with 5 = 5 > 3 < 6 and (5-5)*(6-3) = 0^2.
a(190) = 1 since 190 = 13^2 + 4^2 + 1^2 + 2^2 with 13 > 4 > 1 < 2 and (13-4)*(2-1) = 3^2.
		

References

  • L. E. Dickson, Integers represented by positive ternary quadratic forms, Bull. Amer. Math. Soc. 33(1927), 63-70.
  • L. E. Dickson, Modern Elementary Theory of Numbers, University of Chicago Press, Chicago, 1939, pp. 112-113.

Crossrefs

Programs

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

A299924 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 2*y + 3*z is a power of 4 (including 4^0 = 1).

Original entry on oeis.org

1, 1, 1, 1, 3, 4, 1, 1, 2, 2, 1, 2, 1, 1, 3, 1, 1, 11, 4, 6, 7, 7, 8, 4, 4, 6, 14, 4, 6, 17, 10, 1, 10, 6, 10, 7, 4, 4, 16, 2, 3, 10, 2, 1, 9, 6, 3, 2, 1, 5, 2, 3, 7, 9, 3, 1, 6, 2, 3, 7, 1, 4, 4, 1, 3, 4, 3, 1, 13, 20
Offset: 1

Views

Author

Zhi-Wei Sun, Feb 21 2018

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 3, 7, 13, 49, 61, 4^k*m (k = 0,1,2,... and m = 1, 2, 11, 14, 17).
(ii) Let a,b,c,d be nonnegative integers with a >= b >= c >= d, b positive, and gcd(a,b,c,d) not divisible by 4. Then, any positive square can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that a*x + b*y + c*z + d*w = 4^k for some k = 0,1,2,..., if and only if d = 0 and (a,b,c) is among the following ordered triples: (3,2,1), (2,1,0), (3,1,0), (4,2,0), (8,1,0), (15,1,0) and (16,2,0).
By Theorem 1.1(i) of arXiv:1701.05868, any positive square can be written as (4^k)^2 + x^2 + y^2 + z^2 with k,x,y,z nonnegative integers.
We have verified that a(n) > 0 for all n = 1..50000.

Examples

			a(1) = 1 since 1^2 = 1^2 + 0^2 + 0^2 + 0^2 with 1 + 2*0 + 3*0 = 4^0.
a(2) = 1 since 2^2 = 0^2 + 2^2 + 0^2 + 0^2 with 0 + 2*2 + 3*0 = 4.
a(3) = 1 since 3^2 = 2^2 + 1^2 + 0^2 + 2^2 with 2 + 2*1 + 3*0 = 4.
a(7) = 1 since 7^2 = 2^2 + 4^2 + 2^2 + 5^2 with 2 + 2*4 + 3*2 = 4^2.
a(11) = 1 since 11^2 = 2^2 + 1^2 + 4^2 + 10^2 with 2 + 2*1 + 4*3 = 4^2.
a(13) = 1 since 13^2 = 8^2 + 1^2 + 2^2 + 10^2 with 8 + 2*1 + 3*2 = 4^2.
a(14) = 1 since 14^2 = 4^2 + 6^2 + 0^2 + 12^2 with 4 + 2*6 + 3*0 = 4^2.
a(17) = 1 since 17^2 = 0^2 + 8^2 + 0^2 + 15^2 with 0 + 2*8 + 4*0 = 4^2.
a(49) = 1 since 49^2 = 22^2 + 3^2 + 12^2 + 42^2 with 22 + 2*3 + 3*12 = 4^3.
a(61) = 1 since 61^2 = 6^2 + 20^2 + 6^2 + 57^2 with 6 + 2*20 + 3*6 = 4^3.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Pow[n_]:=Pow[n]=IntegerQ[Log[4,n]];
    Do[r=0;Do[If[SQ[n^2-x^2-y^2-z^2]&&Pow[x+2y+3z],r=r+1],{x,0,n},{y,0,Sqrt[n^2-x^2]},{z,0,Sqrt[n^2-x^2-y^2]}];Print[n," ",r],{n,1,70}]
Showing 1-10 of 140 results. Next