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

A219055 Number of ways to write n = p+q(3-(-1)^n)/2 with p>q and p, q, p-6, q+6 all prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 11 2012

Keywords

Comments

Conjecture: a(n) > 0 for all even n > 8012 and odd n > 15727.
This implies Goldbach's conjecture, Lemoine's conjecture and the conjecture that there are infinitely many primes p with p+6 also prime.
It has been verified for n up to 10^8.
Zhi-Wei Sun also made the following general conjecture: For any two multiples d_1 and d_2 of 6, all sufficiently large integers n can be written as p+q(3-(-1)^n)/2 with p>q and p, q, p-d_1, q+d_2 all prime. For example, for (d_1,d_2) = (-6,6),(-6,-6),(6,-6),(12,6),(-12,-6), it suffices to require that n is greater than 15721, 15733, 15739, 16349, 16349 respectively.

Examples

			a(18) = 2 since 18 = 5+13 = 7+11 with 5+6, 13-6, 7+6, 11-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&&PrimeQ[n-(1+Mod[n,2])Prime[k]-6]==True,1,0],{k,1,PrimePi[(n-1)/(2+Mod[n,2])]}]
    Do[Print[n," ",a[n]],{n,1,100000}]
  • PARI
    A219055(n)={my(c=1+bittest(n, 0), s=0); forprime(q=1, (n-1)\(c+1), isprime(q+6) && isprime(n-c*q) && isprime(n-c*q-6) && s++); s} \\ M. F. Hasler, Nov 11 2012

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

A227909 Number of ways to write 2*n = p + q with p, q and (p-1)*(q+1) - 1 all prime.

Original entry on oeis.org

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

Views

Author

Olivier Gérard and Zhi-Wei Sun, Oct 13 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This is stronger than Goldbach's conjecture for even numbers. It also implies A. Murthy's conjecture (cf. A109909) for even numbers.
We have verified the conjecture for n up to 2*10^7.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Jul 26 2023

Examples

			a(6) = 1 since 2*6 = 5 + 7, and (5-1)*(7+1)-1 = 31 is prime.
a(10) = 1 since 2*10 = 7 + 13, and (7-1)*(13+1)-1 = 83 is prime.
a(20) = 1 since 2*20 = 17 + 23, and (17-1)*(23+1)-1 = 383 is prime.
		

Crossrefs

Programs

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

A219558 Number of odd prime pairs {p,q} (p>q) such that p+(1+(n mod 2))q=n and ((p-1-(n mod 2))/q)=((q+1)/p)=1 where (-) denotes the Legendre symbol.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 23 2012

Keywords

Comments

For any integer m, define s(m) as the smallest positive integer s such that for each n=s,s+1,... there are primes p>q>2 with p+(1+(n mod 2))q=n and ((p-(1+(n mod 2))m)/q)=((q+m)/p)=1. If such a positive integer s does not exist, then we set s(m)=0.
Zhi-Wei Sun has the following general conjecture: s(m) is always positive. In particular, s(0)=1239,
s(1)=1470, s(-1)=2192, s(2)=1034, s(-2)=1292,
s(3)=1698, s(-3)=1788, s(4)=848, s(-4)=1458,
s(5)=1490, s(-5)=2558, s(6)=1115, s(-6)=1572,
s(7)=1550, s(-7)=932, s(8)=825, s(-8)=2132,
s(9)=1154, s(-9)=1968, s(10)=1880, s(-10)=1305,
s(11)=1052, s(-11)=1230, s(12)=2340, s(-12)=1428,
s(13)=2492, s(-13)=2673, s(14)=1412, s(-14)=1638,
s(15)=1185, s(-15)=1230, s(16)=978, s(-16)=1605,
s(17)=1154, s(-17)=1692, s(18)=1757, s(-18)=2292,
s(19)=1230, s(-19)=2187, s(20)=2048, s(-20)=1372,
s(21)=1934, s(-21)=1890, s(22)=1440, s(-22)=1034,
s(23)=1964, s(-23)=1322, s(24)=1428, s(-24)=2042,
s(25)=1734, s(-25)=1214, s(26)=1260, s(-26)=1230,
s(27)=1680, s(-27)=1154, s(28)=1652, s(-28)=1808,
s(29)=1112, s(-29)=1670, s(30)=1820, s(-30)=1284.
Note that s(1)=1470 means that a(n)>0 for all n=1470,1471,... That s(0)=1239 is related to a conjecture of Olivier Gérard and Zhi-Wei Sun.
If we replace ((p-1-(n mod 2))/q)=((q+1)/p)=1 in the definition of a(n) by ((p-1)/q)=((q+1)/p)=1, then the new a(n) seems positive for any n>1181.

Examples

			a(14)=1 since 14=11+3 with ((11-1)/3)=((3+1)/11)=1.
a(31)=1 since 31=17+2*7 with ((17-2)/7)=((7+1)/17)=1.
		

Crossrefs

Programs

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