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-10 of 14 results. Next

A199920 Number of ways to write n = p+k with p, p+6, 6k-1 and 6k+1 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 22 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>11.
This implies that there are infinitely many twin primes and also infinitely many sexy primes. It has been verified for n up to 10^9. See also A199800 for a weaker version of this conjecture.
Zhi-Wei Sun also conjectured that any integer n>6 not equal to 319 can be written as p+k with p, p+6, 3k-2+(n mod 2) and 3k+2-(n mod 2) all prime.

Examples

			a(21)=1 since 21=11+10 with 11, 11+6, 6*10-1 and 6*10+1 all prime.
		

Crossrefs

Programs

A218867 Number of prime pairs {p,q} with p>q and {p-4,q+4} also prime such that p+(1+(n mod 6))q=n if n is not congruent to 4 (mod 6), and p-q=n and q

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 13 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>50000 with n different from 50627, 61127, 66503.
This conjecture implies that there are infinitely many cousin prime pairs. It is similar to the conjectures related to A219157 and A219055.

Examples

			a(20)=1 since 20=11+3*3 with 11-4 and 3+4 prime. a(28)=1 since 28=41-13 with 41-4 and 13+4 prime.
		

Crossrefs

Programs

  • Mathematica
    c[n_]:=c[n]=If[Mod[n+2,6]==0,1,-1-Mod[n,6]]; d[n_]:=d[n]=2+If[Mod[n+2,6]>0,Mod[n,6],0]; a[n_]:=a[n]=Sum[If[PrimeQ[Prime[k]+4] == True && PrimeQ[n+c[n]Prime[k]] == True && PrimeQ[n+c[n]Prime[k]-4]==True,1,0], {k,1,PrimePi[(n-1)/d[n]]}]; Do[Print[n," ",a[n]], {n,100}]

A219157 Number of prime pairs {p,q} with p>q and p-2,q+2 also prime such that p+(1+mod(-n,6))q=n if n is not congruent to 2 mod 6, and p-q=n and q

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 0, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 0, 2, 0, 2, 2, 1, 1, 2, 3, 1, 0, 2, 1, 1, 0, 2, 2, 1, 2, 1, 2, 1, 0, 1, 0, 2, 1, 2, 1, 1, 1, 2, 1, 2, 2, 1, 1, 2, 2, 2, 1, 1, 2, 1, 1, 2, 2, 2, 1, 2, 2, 0, 1, 3, 1, 0
Offset: 1

Views

Author

Zhi-Wei Sun, Nov 12 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>30000 with n different from 38451, 46441, 50671, 62371.
This conjecture is stronger than the twin prime conjecture. It is similar to the conjecture associated with A219055 about sexy prime pairs.

Examples

			a(16)=1 since 16=7+3*3 with 7-2 and 3+2 prime. a(26)=1 since 26=31-5 with 31-2 and 5+2 prime.
		

Crossrefs

Programs

  • Mathematica
    c[n_]:=c[n]=If[Mod[n-2,6]==0,1,-1-Mod[-n,6]]
    d[n_]:=d[n]=2+If[Mod[n-2,6]>0,Mod[-n,6],0]
    a[n_]:=a[n]=Sum[If[PrimeQ[Prime[k]+2]==True&&PrimeQ[n+c[n]Prime[k]]==True&&PrimeQ[n+c[n]Prime[k]-2]==True,1,0],
    {k,1,PrimePi[(n-1)/d[n]]}]
    Do[Print[n," ",a[n]],{n,1,100000}]

A219185 Number of prime pairs {p,q} (p>q) with 3(p-q)-1 and 3(p-q)+1 both prime such that p+(1+(n mod 2))q=n.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 13 2012

Keywords

Comments

Conjecture: a(n)>0 for all odd n>4676 and even n>30986.
This conjecture has been verified for n up to 5*10^7. It implies Goldbach's conjecture, Lemoine's conjecture and the twin prime conjecture.

Examples

			a(11)=1 since 11=5+2*3, and both 3(5-3)-1=5 and 3(5-3)+1=7 are prime.
a(16)=2 since 16=11+5=13+3, and 3(11-5)-1, 3(11-5)+1, 3(13-3)-1, 3(13-3)+1 are all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[n-(1+Mod[n,2])Prime[k]]==True&&PrimeQ[3(n-(2+Mod[n,2])Prime[k])-1]==True&&PrimeQ[3(n-(2+Mod[n,2])Prime[k])+1]==True,1,0],
    {k,1,PrimePi[(n-1)/(2+Mod[n,2])]}]
    Do[Print[n," ",a[n]],{n,1,100000}]
  • PARI
    a(n)=if(n%2, aOdd(n), aEven(n))
    aOdd(n)=my(s); forprime(q=2,(n-1)\3, my(p=n-2*q); if(isprime(n-2*q) && isprime(3*n-9*q-1) && isprime(3*n-9*q+1), s++)); s
    aEven(n)=my(s); forprime(q=2,n/2, if(isprime(n-q) && isprime(3*n-6*q-1) && isprime(3*n-6*q+1), s++)); s
    \\ Charles R Greathouse IV, Jul 31 2016

A220455 Number of ways to write n=x+y (x>0, y>0) with 3x-2, 3x+2 and 2xy+1 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 15 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>7.
This has been verified for n up to 10^8. It implies that there are infinitely many cousin primes.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Aug 06 2023
Zhi-Wei Sun also made some other similar conjectures, e.g., he conjectured that any integer n>17 can be written as x+y (x>0, y>0) with 2x-3, 2x+3 and 2xy+1 all prime, and each integer n>28 can be written as x+y (x>0, y>0) with 2x+1, 2y-1 and 2xy+1 all prime.
Both conjectures verified for n up to 10^9. - Mauro Fiorentini, Aug 06 2023

Examples

			a(25)=1 since 25=13+12 with 3*13-2, 3*13+2 and 2*13*12+1=313 all prime.
		

Crossrefs

Programs

A220554 Number of ways to write 2n = p+q (q>0) with p, 2p+1 and (p-1)^2+q^2 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 15 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>1.
This has been verified for n up to 2*10^8. It implies that there are infinitely many Sophie Germain primes.
Note that Ming-Zhi Zhang asked (before 1990) whether any odd integer greater than 1 can be written as x+y (x,y>0) with x^2+y^2 prime, see A036468.
Zhi-Wei Sun also made the following related conjectures:
(1) Any integer n>2 can be written as x+y (x,y>=0) with 3x-1, 3x+1 and x^2+y^2-3(n-1 mod 2) all prime.
(2) Each integer n>3 not among 20, 40, 270 can be written as x+y (x,y>0) with 3x-2, 3x+2 and x^2+y^2-3(n-1 mod 2) all prime.
(3) Any integer n>4 can be written as x+y (x,y>0) with 2x-3, 2x+3 and x^2+y^2-3(n-1 mod 2) all prime. Also, every n=10,11,... can be written as x+y (x,y>=0) with x-3, x+3 and x^2+y^2-3(n-1 mod 2) all prime.
(4) Any integer n>97 can be written as p+q (q>0) with p, 2p+1, n^2+pq all prime. Also, each integer n>10 can be written as p+q (q>0) with p, p+6, n^2+pq all prime.
(5) Every integer n>3 different from 8 and 18 can be written as x+y (x>0, y>0) with 3x-2, 3x+2 and n^2-xy all prime.
All conjectures verified for n up to 10^9. - Mauro Fiorentini, Sep 21 2023

Examples

			a(16)=1 since 32=11+21 with 11, 2*11+1=23 and (11-1)^2+21^2=541 all prime.
		

References

  • R. K. Guy, Unsolved Problems in Number Theory, 2nd Edition, Springer, New York, 2004, p. 161.

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[p]==True&&PrimeQ[2p+1]==True&&PrimeQ[(p-1)^2+(2n-p)^2]==True,1,0],{p,1,2n-1}]
    Do[Print[n," ",a[n]],{n,1,1000}]

A261627 Number of primes p such that n-(p*n'-1) and n+(p*n'-1) are both prime, where n' is 1 or 2 according as n is odd or even.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Aug 27 2015

Keywords

Comments

Conjecture: a(n) > 0 for all n > 6, and a(n) = 1 only for n = 5, 7, 10, 11, 12, 19, 22, 30, 34, 44, 46, 72, 142.
This is stronger than Goldbach's conjecture (A002375) and Lemoine's conjecture (A046927).
I have verified the conjecture for n up to 10^8.
Verified for n up to 10^9. - Mauro Fiorentini, Jul 05 2023
Conjecture verified for n < 1.2 * 10^12. - Jud McCranie, Aug 26 2023

Examples

			a(19) = 1 since 13, 19-(13-1) = 7 and 19+(13-1) = 31 are all prime.
a(142) = 1 since 41, 142-(2*41-1) = 61 and 142+(2*41-1) = 223 are all prime.
		

Crossrefs

Programs

  • Mathematica
    Do[r=0;Do[If[PrimeQ[n-(3+(-1)^n)/2*Prime[k]+1]&&PrimeQ[n+(3+(-1)^n)/2*Prime[k]-1],r=r+1],{k,1,PrimePi[2n/(3+(-1)^n)]}];Print[n," ",r];Continue,{n,1,80}]

A187759 Number of ways to write n=x+y (0

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 03 2013

Keywords

Comments

Conjecture: If n>200 is not among 211, 226, 541, 701, then a(n)>0.
This essentially follows from the conjecture related to A219157, since n=x+y for some positive integers x and y with 6x-1,6x+1,6y-1,6y+1 all prime if and only if 6n=p+q for some twin prime pairs {p,p-2} and {q,q+2}.
Similarly, the conjecture related to A218867 implies that any integer n>491 can be written as x+y (0A219055 implies that any integer n>1600 not among 2729 and 4006 can be written as x+y (0

Examples

			a(9)=1 since 9=2+7 with 6*2-1, 6*2+1, 6*7-1 and 6*7+1 all prime.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[6k-1]==True&&PrimeQ[6k+1]==True&&PrimeQ[6(n-k)-1]==True&&PrimeQ[6(n-k)+1]==True,1,0],{k,1,(n-1)/2}]
    Do[Print[n," ",a[n]],{n,1,100}]
  • PARI
    a(n)=sum(x=1,(n-1)\2,isprime(6*x-1)&&isprime(6*x+1)&&isprime(6*n-6*x-1)&&isprime(6*n-6*x+1)) \\ Charles R Greathouse IV, Feb 28 2013

A187758 Number of ways to write n=x+y (x,y>0) with 2x-3, 2x+3, 6y+1 and 6y+5 all prime.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Jan 03 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>4.
This has been verified for n up to 10^8. It implies that there are infinitely many cousin primes and also infinitely many sexy primes.

Examples

			a(5)=1 since 5=4+1 with 2*4-3, 2*4+3, 6*1+1 and 6*1+5 all prime.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[2k-3]==True&&PrimeQ[2k+3]==True&&PrimeQ[6(n-k)+1]==True&&PrimeQ[6(n-k)+5]==True,1,0],{k,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

A219966 Number of ways to write n=p+q+(n mod 2)q with q<=n/2 and p, q, q+6 all prime.

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Dec 02 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>11.
This conjecture is stronger than Goldbach's conjecture and Lemoine's conjecture. It can be further strengthened; see A219055 and the comments there.

Examples

			a(19)=1 since 19=5+2*7 with 5, 7, 7+6 all prime.
a(20)=1 since 20=13+7 with 13, 7, 7+6 all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[Prime[k]+6]==True&&PrimeQ[n-(1+Mod[n,2])Prime[k]]==True,1,0],{k,1,PrimePi[n/2]}]
    Do[Print[n," ",a[n]],{n,1,10000}]
Showing 1-10 of 14 results. Next