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

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

A338162 Number of ways to write 4*n + 1 as x^2 + y^2 + z^2 + w^2 with x^2 + 7*y^2 = 2^k for some k = 0,1,2,..., where x, y, z, w are nonnegative integers with z <= w.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 14 2020

Keywords

Comments

Conjecture: a(n) > 0 for all n >= 0. Moreover, if m > 1 has the form 2^a*(2*b+1), and either a is positive and even, or b is even, then m can be written as x^2 + y^2 + z^2 + w^2 with x^2 + 7*y^2 = 2^k for some positive integer k, where x, y, z, w are nonnegative integers.
We have verified the latter assertion in the conjecture for m up to 4*10^8.

Examples

			a(0) = 1, and 4*0 + 1 = 1^2 + 0^2 + 0^2 +0^2 with 1^2 + 7*0^2 = 2^0.
a(25) = 2, and 25 = 2^2 + 2^2 + 1^2 + 4^2 = 4^2 + 0^2 + 0^2 + 3^2
with 2^2 + 7*2^2 = 2^5 and 4^2 + 7*0^2 = 2^4.
		

Crossrefs

Programs

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