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-3 of 3 results.

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 15 2016

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 16^k*q (k = 0,1,2,... and q = 1, 2, 3, 6, 7, 8, 12, 15, 27, 31, 47, 72, 76, 92, 111, 127).
(ii) Let a and b be positive integers with gcd(a,b) odd. Then any positive integer 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 power of two (including 2^0 = 1) if and only if (a,b) = (1,1), (2,1), (2,3).
(iii) Let a,b,c be positive integers with a <= b and gcd(a,b,c) odd. Then any positive integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and a*x + b*y - c*z a power of two if and only if (a,b,c) is among the triples (1,1,1), (1,1,2), (1,2,1), (1,2,2), (1,3,1), (1,3,2), (1,3,3), (1,3,4), (1,3,5), (1,4,1), (1,4,2), (1,4,3), (1,4,4), (1,5,1), (1,5,2), (1,5,4), (1,5,5,), (1,6,3), (1,7,4), (1,7,7), (1,8,1), (1,9,2), (2,3,1), (2,3,3), (2,3,4), (2,5,1), (2,5,3), (2,5,4), (2,5,5), (2,7,1), (2,7,3), (2,7,7), (2,9,3), (2,11,5), (3,4,3), (7,8,7).
(iv) Let a,b,c be positive integers with b <= c and gcd(a,b,c) odd. Then any positive integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and a*x - b*y - c*z a power of two if and only if (a,b,c) is among the triples (2,2,1), (4,2,1), (4,3,1), (4,4,3).
(v) Let a,b,c be positive integers with a <= b, c <= d, and gcd(a,b,c,d) odd. Then any positive integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and a*x + b*y - c*z -d*w a power of two if and only if (a,b,c,d) is among the quadruples (1,2,1,1), (1,2,1,2), (1,2,1,3), (1,3,1,2), (1,3,2,3), (1,3,2,4), (1,4,1,2), (1,7,2,6), (1,9,1,4), (2,2,2,3), (2,3,1,2), (2,3,1,3), (2,3,2,3), (2,3,6,1), (2,4,1,2), (2,5,1,2), (2,5,2,3), (2,5,3,4), (3,4,1,2), (3,4,1,3), (3,4,1,5), (3,4,2,5), (3,4,3,4), (3,8,1,10), (3,8,2,3), (4,5,1,5).
(vi) Let a,b,c be positive integers with a <= b <= c and gcd(a,b,c,d) odd. Then any positive integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and a*x + b*y + c*z -d*w a power of two if and only if (a,b,c,d) is among the quadruples (1,1,2,2), (1,1,2,3), (1,1,2,4), (1,2,2,3), (1,2,3,4), (1,2,4,3), (1,2,6,7), (1,3,4,4), (1,4,6,5), (2,3,5,4).
(vii) For any positive integers a,b,c,d, not all positive integers can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and a*x - b*y - c*z -d*w a power of two.
(viii) Let a and b be positive integers, and c and d be nonnegative integers. Then, not all positive integers can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers and a*x + b*y + c*z + d*w a power of two.
We have verified a(n) > 0 for all n = 1..2*10^7. The conjecture that a(n) > 0 for all n > 0 appeared in arXiv:1701.05868.

Examples

			a(12) = 1 since 12 = 1^2 + 1^2 + 1^2 + 3^2 with 1 + 2*1 - 2*1 = 4^0.
a(15) = 1 since 15 = 3^2 + 1^2 + 2^2 + 1^2 with 3 + 2*1 - 2*2 = 4^0.
a(27) = 1 since 27 = 4^2 + 1^2 + 1^2 + 3^2 with 4 + 2*1 - 2*1 = 4.
a(31) = 1 since 31 = 3^2 + 2^2 + 3^2 + 3^2 with 3 + 2*2 - 2*3 = 4^0.
a(47) = 1 since 47 = 3^2 + 2^2 + 3^2 + 5^2 with 3 + 2*2 - 2*3 = 4^0.
a(72) = 1 since 72 = 8^2 + 0^2 + 2^2 + 2^2 with 8 + 2*0 - 2*2 = 4.
a(76) = 1 since 76 = 1^2 + 5^2 + 5^2 + 5^2 with 1 + 2*5 - 2*5 = 4^0.
a(92) = 1 since 92 = 4^2 + 6^2 + 6^2 + 2^2 with 4 + 2*6 - 2*6 = 4.
a(111) = 1 since 111 = 9^2 + 1^2 + 5^2 + 2^2 with 9 + 2*1 - 2*5 = 4^0.
a(127) = 1 since 127 = 7^2 + 2^2 + 5^2 + 7^2 with 7 + 2*2 - 2*5 = 4^0.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    FP[n_]:=FP[n]=n>0&&IntegerQ[Log[4,n]];
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&FP[x+2y-2z],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,1,80}]

A279616 Numbers of the form x^2 + y^2 + z^2 with x + 2*y - 2*z a power of four (including 4^0 = 1), where x,y,z are nonnegative integers.

Original entry on oeis.org

1, 3, 4, 5, 9, 10, 14, 16, 17, 18, 19, 20, 22, 24, 29, 33, 34, 35, 37, 41, 45, 48, 49, 50, 51, 52, 53, 58, 59, 61, 64, 65, 66, 68, 69, 70, 73, 74, 77, 78, 80, 82, 84, 88, 89, 90, 94, 97, 98, 99, 100, 104, 106, 107, 109, 113, 114, 116, 117, 121, 122, 125, 129, 130, 132, 133, 138, 139, 141, 144
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 15 2016

Keywords

Comments

Part (i) of the conjecture in A279612 implies that any positive integer can be written as the sum of a square and a term of the current sequence.
It seems that a(n)/n has the limit 2 as n tends to the infinity.

Examples

			a(1) = 1 since 1 = 1^2 + 0^2 + 0^2 + 0^2 with 1 + 2*0 - 2*0 = 4^0.
a(2) = 3 since 3 = 1^2 + 1^2 + 1^2 + 0^2 with 1 + 2*1 - 2*1 = 4^0.
a(4) = 5 since 5 = 2^2 + 1^2 + 0^2 + 0^2 with 2 + 2*1 - 2*0 = 4.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    FP[n_]:=FP[n]=n>0&&IntegerQ[Log[4,n]];
    ex={};Do[Do[If[SQ[m-x^2-y^2]&&FP[x+2y-2*Sqrt[m-x^2-y^2]],ex=Append[ex,m];Goto[aa]],{x,0,Sqrt[m]},{y,0,Sqrt[m-x^2]}];Label[aa];Continue,{m,1,144}]

A275471 Number of ordered ways to write n as 4^k*(1+x^2+y^2)+z^2, where k,x,y,z are nonnegative integers with x <= y and x == y (mod 2).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 11 2016

Keywords

Comments

Conjecture: a(n) > 0 except for n = 449.
See also A275656, A275678 and A275738 for related conjectures.
As x^2 + y^2 = 2*((x+y)/2)^2 + 2*((x-y)/2)^2, we see that {x^2 + y^2: x and y are integers with x == y (mod 2)} = {2*x^2 + 2*y^2: x and y are integers}.

Examples

			a(8) = 1 since 8 = 4*(1+0^2+0^2) + 2^2 with 0+0 even.
a(31) = 1 since 31 = 4^0*(1+1^2+5^2) + 2^2 with 1+5 even.
a(47) = 1 since 47 = 4^0*(1+1^2+3^2) + 6^2 with 1+3 even.
a(79) = 1 since 79 = 4^0*(1+5^2+7^2)+2^2 with 5+7 even.
a(1009) = 1 since 1009 = 4^2*(1+1^2+1^2) + 31^2 with 1+1 even.
a(7793) = 1 since 7793 = 4^2*(1+12^2+18^2) + 17^2 with 12+18 even.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]]
    Do[r=0;Do[If[SQ[n-4^k*(1+2x^2+2y^2)],r=r+1],{k,0,Log[4,n]},{x,0,Sqrt[(n/4^k-1)/4]},{y,x,Sqrt[(n/4^k-1-2x^2)/2]}];Print[n," ",r];Continue,{n,1,80}]
Showing 1-3 of 3 results.