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.

A299794 Number of ways to write n^2 as x^2 + y^2 + z^2 + w^2 with x >= y >= 0 <= z <= w such that x or 2*y is a power of 4 (including 4^0 = 1) and x + 15*y is also a power of 4.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 04 2018

Keywords

Comments

Conjecture 1: a(n) > 0 for all n > 0. Also, for any integer n > 1 we can write n^2 as x^2 + y^2 + z^2 + w^2 with x >= y >= 0 <= z <= w such that 2*x or y is a power of 4 and also x + 15*y = 2^(2k+1) for some k = 0,1,2,....
Conjecture 2: Let d be 2 or 8, and let r be 0 or 1. Then any positive square n^2 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x or y is a power of 2 and x + d*y = 2^(2k+r) for some k = 0,1,2,....
We have verified Conjecture 1 for n up to 10^7.
See also A299537, A300219 and A300396 for similar conjectures.

Examples

			a(2) = 1 since 2^2 = 1^2 + 1^2 + 1^2 + 1^2 with 1 = 4^0 and 1 + 15*1 = 4^2.
a(5) = 1 since 5^2 = 4^2 + 0^2 + 0^2 + 3^2 with 4 = 4^1 and 4 + 15*0 = 4^1.
a(19) = 1 since 19^2 = 1^2 + 0^2 + 6^2 + 18^2 with 1 = 4^0 and 1 + 15*0 = 4^0.
a(159) = 1 since 159^2 = 34^2 + 2^2 + 75^2 + 136^2 with 2*2 = 4^1 and 34 + 15*2 = 4^3.
a(1998) = 1 since 1998^2 = 256^2 + 256^2 + 286^2 + 1944^2 with 256 = 4^4 and 256 + 15*256 = 4^6.
a(3742) = 1 since 3742^2 = 2176^2 + 128^2 + 98^2 + 3040^2 with 2*128 = 4^4 and 2176 + 15*128 = 4^6.
		

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[2y]||Pow[4^k-15y],Do[If[SQ[n^2-y^2-(4^k-15y)^2-z^2],r=r+1],{z,0,Sqrt[Max[0,(n^2-y^2-(4^k-15y)^2)/2]]}]],
    {k,0,Log[4,Sqrt[226]*n]},{y,0,Min[n,4^(k-2)]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A300396 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 2*x or y is a power of 4 (including 4^0 = 1) and x + 63*y = 2^(2k+1) for some k = 0,1,2,....

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 05 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 5, 13, 25, 29, 59, 61, 79, 91, 95, 101, 103, 1315, 2^k (k = 1,2,3,...), 2^(2k+1)*m (k = 0,1,2,... and m = 3, 5, 7, 11, 15, 19, 23, 887).
This is stronger than the conjecture that A300360(n) > 0 for all n > 1. Note that a(387) = 3 < A300360(387) = 4 and a(1774) = 1 < A300360(1774) = 2.
We have verified that a(n) > 0 for all n = 2..10^7.
See also A299537, A299794 and A300219 for similar conjectures.

Examples

			a(29) = 1 since 29^2 = 2^2 + 2^2 + 7^2 + 28^2 with 2*2 = 4^1 and 2 + 63*2 = 2^7.
a(86) = 2 since 65^2 + 1^2 + 19^2 + 53^2 = 65^2 + 1^2 + 31^2 + 47^2 with 1 = 4^0 and 65 + 63*1 = 2^7.
a(1774) = 1 since 1774^2 = 8^2 + 520^2 + 14^2 + 1696^2 with 2*8 = 4^2 and 8 + 63*520 = 2^15.
		

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[(2*4^k-63y)/2],Do[If[SQ[n^2-y^2-(2*4^k-63y)^2-z^2],r=r+1],{z,0,Sqrt[Max[0,(n^2-y^2-(2*4^k-63y)^2)/2]]}]],{k,0,Log[4,Sqrt[63^2+1]*n/2]},{y,0,Min[n,2*4^k/63]}];tab=Append[tab,r],{n,1,80}];Print[tab]

A300360 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 2 (including 1) and x + 63*y = 2^(2k+1) for some k = 0,1,2,....

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 03 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 5, 13, 25, 29, 59, 61, 79, 91, 95, 101, 103, 1315, 2^k (k = 1,2,3,...), 2^(2k+1)*m (k = 0,1,2,... and m = 3, 5, 7, 11, 15, 19, 23).
Note the difference between the current sequence and A300356.
In the comments of A300219, the author conjectured that a positive square 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 are powers of 4 unless n has the form 4^k*81503 with k a nonnegative integer. Since 81503^2 = 208^2 + 16^2 + 51167^2 + 63440^2 with 16 = 4^2 and 208 + 3*16 = 4^4, this implies that any positive square can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x or y is a power of 4 and x + 3y is also a power of 4. We also conjecture that for any positive integer n not of the form 4^k*m (k =0,1,... and m = 2, 7) we can write n^2 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x or y is a power of 4 and x + 2*y is also a power of 4.

Examples

			a(38) = 1 since 38^2 = 2^2 + 0^2 + 12^2 + 36^2 with 2 = 2^1 and 2 + 63*0 = 2^1.
a(86) = 2 since 86 = 65^2 + 1^2 + 19^2 + 53^2 = 65^2 + 1^2 + 31^2 + 47^2 with 1 = 2^0 and 65 + 63*1 = 2^7.
a(535) = 3 since 535^2 = 2^2 + 130^2 + 64^2 + 515^2 = 2^2 + 130^2 + 139^2 + 500^2 = 8^2 + 520^2 + 40^2 + 119^2 with 2 = 2^1, 8 = 2^3, 2 + 63*130 = 2^13 and 8 + 63*520 = 2^15.
a(1315) = 1 since 1315^2 = 512^2 + 512^2 + 61^2 + 1096^2 with 512 = 2^9 and 512 + 63*512 = 2^15.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Pow[a_,n_]:=Pow[a,n]=IntegerQ[Log[a,n]];
    tab={};Do[r=0;Do[If[SQ[n^2-x^2-y^2-z^2]&&(Pow[2,x]||Pow[2,y])&&Pow[4,(x+63y)/2],r=r+1],{x,0,n},{y,0,Sqrt[n^2-x^2]},{z,0,Sqrt[(n^2-x^2-y^2)/2]}];tab=Append[tab,r],{n,1,80}];Print[tab]
Showing 1-3 of 3 results.