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.

A291624 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 2*y + 5*z, p - 2 and p + 4 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 28 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1 not divisible by 4.
See also A291635 for a stronger conjecture.

Examples

			a(2) = 1 since 2 = 0^2 + 1^2 + 1^2 + 0^2 with 0 + 2*1 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(5) = 1 since 5 = 2^2 + 0^2 + 1^2 + 0^2 with 2 + 2*0 + 5*1 = 7, 7 - 2 = 5 and 7 + 4 = 11 all prime.
a(181) = 1 since 181 = 1^2 + 6^2 + 0^2 + 12^2 with 1 + 2*6 + 5*0 = 13, 13 - 2 = 11 and 13 + 4 = 17 all prime.
a(285) = 1 since 285 = 10^2 + 4^2 + 5^2 + 12^2 with 10 + 2*4 + 5*5 = 43, 43 - 2 = 41 and 43 + 4 = 47 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    TQ[p_]:=TQ[p]=PrimeQ[p]&&PrimeQ[p-2]&&PrimeQ[p+4];
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&TQ[x+2y+5z],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,100}]

A291635 Number of ways to write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 2*y + 5*z, p - 2, p + 4 and p + 10 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 28 2017

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1 not divisible by 4.
This is stronger than the conjecture in A291624. Obviously, it implies that there are infinitely many prime quadruples (p-2, p, p+4, p+10).
We have verified that a(n) > 0 for any integer 1 < n < 10^7 not divisible by 4.

Examples

			a(61) = 1 since 61 = 4^2 + 0^2 + 3^2 + 6^2 with 4 + 2*0 + 5*3 = 19, 19 - 2 = 17, 19 + 4 = 23 and 19 + 10 = 29 all prime.
a(253) = 1 since 253 = 12^2 + 8^2 + 3^2 + 6^2 with 12 + 2*8 + 5*3 = 43, 43 - 2 = 41, 43 + 4 = 47 and 43 + 10 = 53 all prime.
a(725) = 1 since 725 = 7^2 + 0^2 + 0^2 + 26^2 with 7 + 2*0 + 5*0 = 7, 7 - 2 = 5, 7 + 4 = 11 and 7 + 10 = 17 all prime.
a(1511) = 1 since 1511 = 18^2 + 15^2 + 11^2 + 29^2 with 18 + 2*15 + 5*11 = 103, 103 - 2 = 101, 103 + 4 = 107 and 103 + 10 = 113 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    PQ[p_]:=PQ[p]=PrimeQ[p]&&PrimeQ[p-2]&&PrimeQ[p+4]&&PrimeQ[p+10]
    Do[r=0;Do[If[SQ[n-x^2-y^2-z^2]&&PQ[x+2y+5z],r=r+1],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]},{z,0,Sqrt[n-x^2-y^2]}];Print[n," ",r],{n,1,100}]
Showing 1-2 of 2 results.