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.

A301304 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x >= y >= 0 <= z <= w such that x^2 + 7*y^2 = 2^k*m for some k = 0,1,2 and m = 1,2,3,....

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 17 2018

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
We have verified this for n up to 10^8.
See also A301303 and A301314 for similar conjectures.

Examples

			a(79) = 1 since 79 = 5^2 + 1^2 + 2^2 + 7^2 with 5^2 + 7*1^2 = 2^2*2^3.
a(323) = 1 since 323 = 3^2 + 1^2 + 12^2 + 13^2 with 3^2 + 7*1^2 = 2*2^3.
a(646) = 1 since 646 = 22^2 + 11^2 + 4^2 + 5^2 with 22^2 + 7*11^2 = 11^3.
a(815) = 1 since 815 = 9^2 + 5^2 + 15^2 + 22^2 with 9^2 + 7*5^2 = 2^2*4^3.
a(1111) = 1 since 1111 = 1^2 + 1^2 + 22^2 + 25^2 with 1^2 + 7*1^2 = 2^3.
a(2822) = 1 since 2822 = 2^2 + 0^2 + 3^2 + 53^2 with 2^2 + 7*0^2 = 2^2*1^3.
		

Crossrefs

Programs

  • Mathematica
      SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    CQ[n_]:=CQ[n]=IntegerQ[n^(1/3)];
    QQ[n_]:=n>0&&(CQ[n]||CQ[n/2]||CQ[n/4]);
    tab={};Do[r=0;Do[If[QQ[x^2+7y^2],Do[If[SQ[n-x^2-y^2-z^2],r=r+1],{z,0,Sqrt[(n-x^2-y^2)/2]}]],{y,0,Sqrt[n/2]},{x,y,Sqrt[n-y^2]}];tab=Append[tab,r],{n,1,80}];Print[tab]