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

A291150 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + 4*w^2, where x,y,z,w are nonnegative integers with x <= y <= z such that 2^x + 2^y + 2^z + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 19 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 1, 2, 3, 5, 7, 11, 14, 15, 21, 23, 35, 41, 43, 59, 71, 309, 435.
(ii) Any positive even number not divisibly by 8 and other than 6 and 14 can be written as x^2 + y^2 + z^2 + w^2, where w is a positive odd integer, and x,y,z are nonnegative integers with 2^x + 2^y + 2^z + 1 prime.
(iii) Let n be a positive integer. If n is not divisible by 8, then n can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2^y + 1 is prime. If n is not a multiple of 2^7 = 128, then we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2^y - 1 is prime.
(iv) Let n be a positive integer. If n is not divisible by 8, then n can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2*2^y + 3*2^z + 4*2^w - 1 is prime. If n is not a multiple of 2^8 = 256, then we can write n as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 2*2^y +3*2^z + 4*2^w + 1 is prime.
I have verified that a(n) > 0 for all n = 0..10^7. - Zhi-Wei Sun, Aug 23 2017

Examples

			a(0) = 1 since 2*0+1 = 0^2 + 0^2 + 1^2 + 4*0^2 with 2^0 + 2^0 + 2^1 + 1 = 5 prime.
a(14) = 1 since 2*14+1 = 2^2 + 3^2 + 4^2 + 4*0^2 with 2^2 + 2^3 + 2^4 + 1 = 29 prime.
a(35) = 1 since 2*35+1 = 1^2 + 3^2 + 5^2 + 4*3^2 with 2^1 + 2^3 + 2^5 + 1 = 43 prime.
a(43) = 1 since 2*43+1 = 1^2 + 5^2 + 5^2 + 4*3^2 with 2^1 + 2^5 + 2^5 + 1 = 67 prime.
a(59) = 1 since 2*59+1 = 1^2 + 3^2 + 3^2 + 4*5^2 with 2^1 + 2^3 + 2^3 + 1 = 19 prime.
a(71) = 1 since 2*71+1 = 1^2 + 5^2 + 9^2 + 4*3^2 with 2^1 + 2^5 + 2^9 + 1 = 547 prime.
a(309) = 1 since 2*309+1 = 5^2 + 13^2 + 13^2 + 4*8^2 with 2^5 + 2^13 + 2^13 + 1 = 16417 prime.
a(435) = 1 since 2*435+1 = 13^2 + 13^2 + 23^2 + 4*1^2 with 2^13 + 2^13 + 2^23 + 1 = 8404993 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[(2n+1-x^2-y^2-z^2)/4]&&PrimeQ[2^x+2^y+2^z+1],r=r+1],{x,0,Sqrt[(2n+1)/3]},{y,x,Sqrt[(2n+1-x^2)/2]},{z,y,Sqrt[2n+1-x^2-y^2]}];Print[n," ",r],{n,0,80}]

A291191 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2, where x,y,z,w are nonnegative integers with x <= y, z <= w and x + y < z + w such that 2^(x+y) + 2^(z+w) + 1 is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 20 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 only for n = 1, 2, 3, 6, 7, 11, 12, 16, 19, 20, 23, 26, 63, 75, 98.
(ii) Any integer n > 1 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 2^(z+w) is a practical number (A005153).
(iii) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^(x+y) + 3^(z+w) is prime.
(iv) Any positive integer not divisible by 32 can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that 2^x + 3^y + 4^z is prime.
See also A291150 for a similar conjecture.
I have verified that a(n) > 0 for all n = 1..10^7. For example, a(6998538) > 0 since 2*6998538+1 = 122^2 + 220^2 + 208^2 + 3727^2 with 2^(122+220) + 2^(208+3727) + 1 = 2^342 + 2^3935 + 1 a prime of 1185 decimal digits. - Zhi-Wei Sun, Aug 23 2017

Examples

			a(1) = 1 since 2*1+1 = 0^2 + 1^2 + 1^2 + 1^2 with 2^(0+1) + 2^(1+1) + 1 = 7 prime.
a(2) = 1 since 2*2+1 = 0^2 + 1^2 + 0^2 + 2^2 with 2^(0+1) + 2^(0+2) + 1 = 7 prime.
a(19) = 1 since 2*19+1 = 2^2 + 3^2 + 1^2 + 5^2 with 2^(2+3) + 2^(1+5) + 1 = 97 prime.
a(26) = 1 since 2*26+1 = 1^2 + 4^2 + 0^2 + 6^2 with 2^(1+4) + 2^(0+6) + 1 = 97 prime.
a(63) = 1 since 2*63+1 = 1^2 + 5^2 + 1^2 +10^2 with 2^(1+5) + 2^(1+10) + 1 = 2113 prime.
a(75) = 1 since 2*75+1 = 1^2 + 5^2 + 5^2 + 10^2 with 2^(1+5) + 2^(5+10) + 1 = 32833 prime.
a(98) = 1 since 2*98+1 = 6^2 + 6^2 + 2^2 + 11^2 with 2^(6+6) + 2^(2+11) + 1 = 12289 prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&x+y
    				

A291455 Number of ways to write 2*n+1 as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 3*y + 5*z + 7*w, x^3 + 3*y^3 + 5*z^3 + 7*w^3 and x^7 + 3*y^7 + 5*z^7 + 7*w^7 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 24 2017

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 3, 4, 7, 17, 23, 34, 39, 51, 66, 69, 99, 109, 115, 171, 191. Also, any integer n > 1 with gcd(n,42) = 1 can be written as x + 3*y + 5*z + 7*w with x,y,z,w nonnegative integers such that x^3 + 3*y^3 + 5*z^3 + 7*w^3 and x^7 + 3*y^7 + 5*z^7 + 7*w^7 are both prime.
(ii) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x + 5*y + 9*z + 11*w, x^3 + 5*y^3 + 9*z^3 + 11*w^3 and x^5 + 5*y^5 + 9*z^5 + 11*w^5 are all prime. Also, any integer n > 1 with gcd(n,30) = 1 can be written as x + 5*y + 9*z + 11*w with x,y,z,w nonnegative integers such that x^3 + 5*y^3 + 9*z^3 + 11*w^3 and x^5 + 5*y^5 + 9*z^5 + 11*w^5 are both prime.
(iii) Let (k,m) be one of the ordered pairs (1,2), (1,4), (1,5), (1,9), (2,6), (3,5), (8,8). Then any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that x^k + 3*y^k + 5*z^k + 7*w^k and x^m + 3*y^m + 5*z^m + 7*w^m are both prime.
(iv) Any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x + 3*y + 5*z + 7*w and 2*p+1 (or p-4) are both prime.
(v) For each m = 1, 2, 4, any positive odd integer can be written as x^2 + y^2 + z^2 + w^2 with x,y,z,w nonnegative integers such that p = x^m + 3*y^m + 5*z^m + 7*w^m and p+6 are both prime.
See also A290935 for a similar conjecture involving twin primes.

Examples

			a(4) = 1 since 2*4+1 = 0^2 + 2^2 + 2^2 + 1^2 with 0 + 3*2 + 5*2 + 7*1 = 23, 0^3 + 3*2^3 + 5*2^3 + 7*1^3 = 71 and 0^7 + 3*2^7 + 5*2^7 + 7*1^7 = 1031 all prime.
a(34) = 1 since 2*34+1 = 2^2 + 0^2 + 4^2 + 7^2 with 2 + 3*0 + 5*4 + 7*7 = 71, 2^3 + 3*0^3 + 5*4^3 + 7*7^3 = 2729 and 2^7 + 3*0^7 + 5*4^7 + 7*7^7 = 5846849 all prime.
a(66) = 1 since 2*66+1 = 4^2 + 6^2 + 9^2 + 0^2 with 4 + 3*6 + 5*9 + 7*0 = 67, 4^3 + 3*6^3 + 5*9^3 + 7*0^3 = 4357 and 4^7 + 3*6^7 + 5*9^7 + 7*0^7 = 24771037 all prime.
a(69) = 1 since 2*69+1 = 11^2 + 3^2 + 0^2 + 3^2 with 11 + 3*3 + 5*0 + 7*3 = 41, 11^3 + 3*3^3 + 5*0^3 + 7*3^3 = 1601 and 11^7 + 3*3^7 + 5*0^7 + 7*3^7 = 19509041 all prime.
a(191) = 1 since 2*191+1 = 11^2 + 6^2 + 1^2 + 15^2 with 11 + 3*6 + 5*1 + 7*15 = 139, 11^3 + 3*6^3 + 5*1^3 + 7*15^3 = 25609 and 11^7 + 3*6^7 + 5*1^7 + 7*15^7 = 1216342609 all prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
    f[m_,x_,y_,z_,w_]:=f[m,x,y,z,w]=x^m+3y^m+5z^m+7w^m;
    Do[r=0;Do[If[SQ[2n+1-x^2-y^2-z^2]&&PrimeQ[f[1,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]]&&PrimeQ[f[3,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]]&&PrimeQ[f[7,x,y,z,Sqrt[2n+1-x^2-y^2-z^2]]],r=r+1],{x,0,Sqrt[2n+1]},{y,0,Sqrt[2n+1-x^2]},{z,0,Sqrt[2n+1-x^2-y^2]}];Print[n," ",r],{n,0,100}]

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