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

A230494 Number of ways to write n = x^2 + y (x, y >= 0) with 2*y^2 - 1 prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 20 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Moreover, if n > 1 is not among 2, 69, 76, then there are positive integers x and y such that x^2 + y is equal to n and 2*y^2 - 1 is prime.
(ii) Any integer n > 1 can be written as x*(x+1)/2 + y with 2*y^2 - 1 prime, where x and y are nonnegative integers. Moreover, if n is not equal to 2 or 15, then we may require additionally that x and y are both positive.
We have verified the conjecture for n up to 2*10^7.
Both conjectures verified for n up to 10^9. - Mauro Fiorentini, Aug 08 2023
See also A230351 and A230493 for similar conjectures.

Examples

			a(9) = 1 since 9 = 1^2 + 8 with 2*8^2 - 1 = 127 prime.
a(69) = 1 since 69 = 0^2 + 69 with 2*69^2 - 1 = 9521 prime.
a(76) = 1 since 76 = 0^2 + 76 with 2*76^2 - 1 = 11551 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[2(n-x^2)^2-1],1,0],{x,0,Sqrt[n]}]
    Table[a[n],{n,1,100}]

A230502 Number of ways to write n = (2-(n mod 2))*p + q + r with p <= q <= r such that p, q, r, p^2 - 2, q^2 - 2, r^2 - 2 are all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 21 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6.
This is stronger than Goldbach's weak conjecture which was finally proved by H. Helfgott in 2013. It also implies that there are infinitely many primes p with p^2 - 2 also prime.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023

Examples

			a(10) = 1 since 10 = 2*2 + 3 + 3 with 2, 3, 2^2 - 2 = 2, 3^2 - 2 = 7 all prime.
a(19) = 2 since 19 = 3 + 3 + 13 = 5 + 7 + 7 with 3, 13, 5, 7, 3^2 - 2 = 7, 13^2 - 2 = 167, 5^2 - 2 = 23, 7^2 - 2 = 47 all prime.
		

Crossrefs

Programs

  • Mathematica
    pp[n_]:=PrimeQ[n^2-2]
    pq[n_]:=PrimeQ[n]&&pp[n]
    a[n_]:=Sum[If[pp[Prime[i]]&&pp[Prime[j]]&&pq[n-(2-Mod[n,2])Prime[i]-Prime[j]],1,0],{i,1,PrimePi[n/(4-Mod[n,2])]},{j,i,PrimePi[(n-(2-Mod[n,2])Prime[i])/2]}]
    Table[a[n],{n,1,100}]

A230493 Number of ways to write n = (2-(n mod 2))*p + q + r with p <= q <= r such that p, q, r, 2*p^2 - 1, 2*q^2 - 1, 2*r^2 - 1 are all prime.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 3, 3, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 3, 3, 3, 2, 2, 3, 3, 2, 2, 2, 1, 1, 2, 2, 1, 3, 3, 1, 3, 2, 4, 1, 2, 2, 4, 3, 3, 2, 4, 3, 3, 4, 3, 4, 3, 3, 4, 3, 2, 2, 2, 3, 3, 2, 4, 3, 2, 3, 5, 1, 4, 3, 3, 2, 4, 4, 3, 4, 5, 2, 4, 5, 4, 3, 2, 4, 4, 3, 2
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 20 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6.
This is stronger than Goldbach's weak conjecture which was finally proved by H. Helfgott in 2013. It also implies that there are infinitely many primes p with 2*p^2 - 1 also prime.
We have verified the conjecture for n up to 10^6.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023
See also A230351, A230494 and A230502 for similar conjectures.

Examples

			a(14) = 1 since 14 = 2*2 + 3 + 7 with 2, 3, 7, 2*2^2 - 1 = 7, 2*3^2 - 1 = 17, 2*7^2 - 1 = 97 all prime.
a(19) = 1 since 19 = 3 + 3 + 13, and 3, 13, 2*3^2 - 1 = 17 and 2*13^2 - 1 = 337 are all prime.
a(53) = 1 since 53 = 3 + 7 + 43, and all the six numbers 3, 7, 43, 2*3^2 - 1 = 17, 2*7^2 - 1 = 97, 2*43^2 - 1 = 3697 are prime.
		

Crossrefs

Programs

  • Mathematica
    pp[n_]:=PrimeQ[2n^2-1]
    pq[n_]:=PrimeQ[n]&&pp[n]
    a[n_]:=Sum[If[pp[Prime[i]]&&pp[Prime[j]]&&pq[n-(2-Mod[n,2])Prime[i]-Prime[j]],1,0],{i,1,PrimePi[n/(4-Mod[n,2])]},{j,i,PrimePi[(n-(2-Mod[n,2])Prime[i])/2]}]
    Table[a[n],{n,1,100}]

A230362 Least prime p with 2*p^2 - 1 and 2*(n-p)^2 -1 both prime, or 0 if such a prime p does not exist.

Original entry on oeis.org

3, 13, 7, 2, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 2, 3, 2, 3, 2, 2, 3, 7, 2, 2, 3, 2, 2, 3, 7, 2, 3, 7, 11, 13, 7, 2, 3, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 2, 3, 7, 2, 2, 3, 2, 3, 7, 7, 2, 3, 11, 2, 3, 7, 2, 2, 2, 3, 43, 7, 7
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 16 2013

Keywords

Comments

Conjecture: 0 < a(n) < sqrt(2n)*(log n) except for n = 1, 2, 3, 232, 1478, 6457.
By the conjecture in the comments in A230351, 0 < a(n) < n for all n > 3.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023

Examples

			a(12) = 2 since 2*2^2 - 1 and 2*(12-2)^2 - 1 = 199 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Do[Do[If[PrimeQ[2Prime[i]^2-1]&&PrimeQ[2(n-Prime[i])^2-1],Print[n," ",Prime[i]];Goto[aa]],{i,1,Max[13,PrimePi[n-1]]}];
    Print[n," ",counterexample];Label[aa];Continue,{n,1,70}]

A230507 Number of ways to write n = a + b + c with a <= b <= c, where a, b, c are among those numbers m (terms of A230506) with 2*m + 1 and 2*m^3 + 1 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 21 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2.
(ii) Any integer n > 8 can be written as x + y + z (x, y, z > 0) with 2*x + 1, 2*y + 1, 2*z - 1, 2*x^4 - 1, 2*y^4 - 1, 2*z^4 - 1 all prime.
Either of the two parts of the conjecture is stronger than Goldbach's weak conjecture which was finally proved by H. Helfgott in 2013.
Part (i) implies that there are infinitely many positive integers n with 2*n + 1 and 2*n^3 + 1 both prime, and part (ii) implies that there are infinitely many positive integers n with 2*n + 1 and 2*n^4 - 1 both prime.
We have verified the conjecture for n up to 10^6.

Examples

			a(8) = 2 since 8 = 1 + 1 + 6 = 1 + 2 + 5, and 2*1 + 1 = 3, 2*1^3 + 1 = 3, 2*6 + 1 = 13, 2*6^3 + 1 = 433, 2*2 + 1 = 5, 2*2^3 + 1 = 17, 2*5 + 1 = 11, 2*5^3 + 1 = 251 are all prime.
		

Crossrefs

Programs

  • Mathematica
    pp[n_]:=PrimeQ[2n+1]&&PrimeQ[2n^3+1]
    a[n_]:=Sum[If[pp[i]&&pp[j]&&pp[n-i-j],1,0],{i,1,n/3},{j,i,(n-i)/2}]
    Table[a[n],{n,1,100}]

A230516 Number of ways to write n = a + b + c with 0 < a <= b <= c such that {a^2+a-1, a^2+a+1}, {b^2+b-1, b^2+b+1}, {c^2+c-1, c^2+c+1} are twin prime pairs.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 22 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 5.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Sep 22 2023
This implies that there are infinitely many twin prime pairs of the form {x^2 + x - 1, x^2 + x + 1}.
See also A230514 for a similar conjecture.

Examples

			a(8) = 1 since 8 = 2 + 3 + 3, and {2*3 - 1, 2*3 + 1} = {5, 7} and {3*4 - 1, 3*4 + 1} = {11, 13} are twin prime pairs.
a(39) = 1 since 39 = 3 + 15 + 21, and {3*4 - 1, 3*4 + 1} = {11, 13}, {15*16 - 1, 15*16 + 1} = {239, 241}, {21*22 - 1, 21*22 + 1} = {461, 463} are twin prime pairs.
		

Crossrefs

Programs

  • Mathematica
    pp[n_]:=PrimeQ[n(n+1)-1]&&PrimeQ[n(n+1)+1]
    a[n_]:=Sum[If[pp[i]&&pp[j]&&pp[n-i-j],1,0],{i,1,n/3},{j,i,(n-i)/2}]
    Table[a[n],{n,1,100}]

A230546 Least positive integer k <= n such that 2*k^2-1 is a prime and n - k is a square, or 0 if such an integer k does not exist.

Original entry on oeis.org

0, 2, 2, 3, 4, 2, 3, 4, 8, 6, 2, 3, 4, 10, 6, 7, 8, 2, 3, 4, 17, 6, 7, 8, 21, 10, 2, 3, 4, 21, 6, 7, 8, 18, 10, 11, 21, 2, 3, 4, 25, 6, 7, 8, 36, 10, 11, 39, 13, 25, 2, 3, 4, 18, 6, 7, 8, 22, 10, 11
Offset: 1

Views

Author

Zhi-Wei Sun, Oct 23 2013

Keywords

Comments

By the conjecture in A230494, we should have a(n) > 0 for all n > 1.

Examples

			a(4) = 3 since neither 4 - 1 = 3 nor 4 - 2 = 2 is a square, but 4 - 3 = 1 is a square and 2*3^2 - 1 = 17 is a prime.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    Do[Do[If[PrimeQ[2k^2-1]&&SQ[n-k],Print[n," ",k];Goto[aa]],{k,1,n}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]
    lpik[n_]:=Module[{k=1},While[!PrimeQ[2k^2-1]||!IntegerQ[Sqrt[n-k]],k++];k]; Join[{0},Array[lpik,60,2]] (* Harvey P. Dale, Aug 04 2021 *)
Showing 1-7 of 7 results.