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 19 results. Next

A219864 Number of ways to write n as p+q with p and 2pq+1 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 30 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>7.
This has been verified for n up to 3*10^8.
Zhi-Wei Sun also made the following general conjecture: For each odd integer m not congruent to 5 modulo 6, any sufficiently large integer n can be written as p+q with p and 2*p*q+m both prime.
For example, when m = 3, -3, 7, 9, -9, -11, 13, 15, it suffices to require that n is greater than 1, 29, 16, 224, 29, 5, 10, 52 respectively.
Sun also guessed that any integer n>4190 can be written as p+q with p, 2*p*q+1, 2*p*q+7 all prime, and any even number n>1558 can be written as p+q with p, q, 2*p*q+3 all prime. He has some other similar observations.

Examples

			a(10)=2 since 10=3+7=7+3 with 2*3*7+1=43 prime.
a(263)=1 since 83 is the only prime p with 2p(263-p)+1 prime.
		

Crossrefs

Programs

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

A208246 Number of ways to write n = p+q with p prime or practical, and q-4, q, q+4 all practical.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 11 2013

Keywords

Comments

Conjecture: a(n)>0 for all n>8.
Zhi-Wei Sun also made some similar conjectures, below are few examples.
(1) Each integer n>3 can be written as p+q with p prime or practical, and q and q+2 both practical.
(2) Any integer n>12 can be written as p+q with p prime or practical, and q-8, q, q+8 all practical.
(3) The interval [n,2n) contains a practical number p with p-n a triangular number.
(4) Any integer n>1 can be written as x^2+y (x,y>0) with 2x and 2xy both practical.
Note that if x>=y>0 with x practical then xy is also practical.

Examples

			a(11)=1 since 11=3+8 with 3 prime, and 4, 8, 12 all practical.
a(12)=1 since 12=4+8 with 4, 8, 12 all practical.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=f[n]=FactorInteger[n]
    Pow[n_,i_]:=Pow[n,i]=Part[Part[f[n],i],1]^(Part[Part[f[n],i],2])
    Con[n_]:=Con[n]=Sum[If[Part[Part[f[n],s+1],1]<=DivisorSigma[1,Product[Pow[n,i],{i,1,s}]]+1,0,1],{s,1,Length[f[n]]-1}]
    pr[n_]:=pr[n]=n>0&&(n<3||Mod[n,2]+Con[n]==0)
    a[n_]:=a[n]=Sum[If[pr[k]==True&&pr[k-4]==True&&pr[k+4]==True&&(PrimeQ[n-k]==True||pr[n-k]==True),1,0],{k,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,100}]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 13 2012

Keywords

Comments

Conjecture: a(n)>0 for every n=1,2,3,... Moreover, any integer n>3 not among 7, 22, 31 can be written as p+q (q>0) with p and p^3+2*q^3 both prime.
We have verified this conjecture for n up to 10^8. D. R. Heath-Brown proved in 2001 that there are infinitely many primes in the form x^3+2*y^3, where x and y are positive integers.
Zhi-Wei Sun also made the following general conjecture: For each positive odd integer m, any sufficiently large integer n can be written as x+y (x>=0, y>=0) with x^m+2*y^m prime.
When m=1, this follows from Bertrand's postulate proved by Chebyshev in 1850. For m = 5, 7, 9, 11, 13, 15, 17, 19, it suffices to require that n is greater than 46, 69, 141, 274, 243, 189, 320, 454 respectively.

Examples

			a(9)=1 since 9=7+2 with 7^3+2*2^3=359 prime.
a(22)=1 since 22=1+21 with 1^3+2*21^3=18523 prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 09 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>2.
This has been verified for n up to 3*10^9. The author observed that for each n=3,...,3*10^9 we may even require x<(log n)^2, but Jack Brennen found that for n=4630581798 we cannot require x<(log n)^2.
The author guessed that the conjecture can be slightly refined as follows: Any integer n>2 can be written as x^2+y with 2*x*y-1 prime, where x and y are positive integers with x<=y.
Zhi-Wei Sun also made the following general conjecture: If m is a positive integer and r is 1 or -1, then any sufficiently large integer n can be written as x^2+y (x>0, y>0) with m*x*y+r prime.
For example, for (m,r)=(1,-1),(1,1),(2,1),(3,-1),(3,1),(4,-1),(4,1),(5,-1),(5,1),(6,-1),(6,1), it suffices to require that n is greater than 12782, 15372, 488, 5948, 2558, 92, 822, 21702, 6164, 777, 952 respectively.

Examples

			a(18)=1 since 18=3^2+9 with 2*3*9-1=53 prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[2k(n-k^2)-1]==True,1,0],{k,1,Sqrt[n]}]
    Do[Print[n," ",a[n]],{n,1,100}]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 01 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>623.
This has been verified for n up to 10^8.
Zhi-Wei Sun made the following general conjecture: For each nonnegative integer m, any sufficiently large integer n can be written as x+y (x>0, y>0) with x-m, x+m and 2*x*y+1 all prime.
For example, when m = 2, 3, 4, 5 it suffices to require that n is greater than 28, 151, 357, 199 respectively.
Sun also conjectured that for each m=0,1,2,... any sufficiently large integer n with m or n odd can be written as x+y (x>0, y>0) with x-m, x+m and x*y-1 all prime.
For example, in the case m=1 it suffices to require that n is greater than 4 and not among 40, 125, 155, 180, 470, 1275, 2185, 3875; when m=2 it suffices to require that n is odd, greater than 7, and different from 13.

Examples

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

Crossrefs

Programs

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

A232174 Number of ways to write n = x + y (x, y > 0) with x + n*y and x^2 + n*y^2 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 19 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1. Also, a(n) = 1 only for n = 2, 5, 8, 14, 19, 20, 24, 32, 54, 68, 101, 168.
(ii) Every n = 3, 4, ... can be written as x + y (x, y > 0) with x*n + y and x*n - y both prime.
(iii) Any integer n > 2 can be written as P + q (q > 0) with p and p + n*q both prime. Also, any integer n > 7 can be written as p + q (q > 0) with p and n*q - p both prime.
In a paper published in 2017, the author announced a USD $200 prize for the first solution to his conjecture that a(n) > 0 for all n > 1. - Zhi-Wei Sun, Dec 03 2017

Examples

			a(2) = 1 since 2 = 1 + 1 with 1 + 2*1 = 1^2 + 2*1^2 = 3 prime.
a(5) = 1 since 5 = 3 + 2 with 3 + 5*2 = 13 and 3^2 + 5*2^2 = 29 both prime.
a(8) = 1 since 8 = 5 + 3 with 5 + 8*3 = 29 and 5^2 + 8*3^2 = 97 both prime.
a(14) = 1 since 14 = 9 + 5 with 9 + 14*5 = 79 and 9^2 + 14*5^2 = 431 both prime.
a(19) = 1 since 19 = 13 + 6 with 13 + 19*6 = 127 and 13^2 + 19*6^2 = 853 both prime.
a(20) = 1 since 20 = 11 + 9 with 11 + 20*9 = 191 and 11^2 + 20*9^2 = 1741 both prime.
a(24) = 1 since 24 = 5 + 19 with 5 + 24*19 = 461 and 5^2 + 24*19^2 = 8689 both prime.
a(32) = 1 since 32 = 23 + 9 with 23 + 32*9 = 311 and 23^2 + 32*9^2 = 3121 both prime.
a(54) = 1 since 54 = 35 + 19 with 35 + 54*19 = 1061 and 35^2 + 54*19^2 = 20719 both prime.
a(68) = 1 since 68 = 45 + 23 with 45 + 68*23 = 1609 and 45^2 + 68*23^2 = 37997 both prime.
a(101) = 1 since 101 = 98 + 3 with 98 + 101*3 = 401 and 98^2 + 101*3^2 = 10513 both prime.
a(168) = 1 since 168 = 125 + 43 with 125 + 168*43 = 7349 and 125^2 + 168*43^2 = 326257 both prime.
		

References

  • D. A. Cox, Primes of the Form x^2 + n*y^2, John Wiley & Sons, 1989.

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 14 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>527.
This has been verified for n up to 2*10^7. It implies the Goldbach conjecture since 2(x+y)=(2x+1)+(2y-1).
Zhi-Wei Sun also made the following similar conjectures:
(1) Each integer n>1544 can be written as x+y (x>0, y>0) with 2x-1, 2y+1 and x^3+2y^3 all prime.
(2) Any odd number n>2060 can be written as 2p+q with p, q and p^3+2((q-1)/2)^3 all prime.
(3) Every integer n>25537 can be written as p+q (q>0) with p, p-6, p+6 and p^3+2q^3 all prime.
(4) Any even number n>1194 can be written as x+y (x>0, y>0) with x^3+2y^3 and 2x^3+y^3 both prime.
(5) Each integer n>3662 can be written as x+y (x>0, y>0) with 3(xy)^3-1 and 3(xy)^3+1 both prime.
(6) Any integer n>22 can be written as x+y (x>0, y>0) with (xy)^4+1 prime. Also, any integer n>7425 can be written as x+y (x>0, y>0) with 2(xy)^4-1 and 2(xy)^4+1 both prime.
(7) Every odd integer n>1 can be written as x+y (x>0, y>0) with x^4+y^2 prime. Moreover, any odd number n>15050 can be written as p+2q with p, q and p^4+(2q)^2 all prime.
Conjectures (1) to (7) verified up to 10^6. - Mauro Fiorentini, Sep 22 2023

Examples

			a(25)=1 since 25=3+22 with 2*3+1, 2*22-1 and 3^3+2*22^3=21323 all prime.
a(26)=1 since 26=11+15 with 2*11+1, 2*15-1 and 11^3+2*15^3=8081 all prime.
		

Crossrefs

Programs

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

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

A230040 Number of ways to write n = x + y + z with y <= z such that all the five numbers 6*x-1, 6*y-1, 6*z-1, 6*x*y-1 and 6*x*z-1 are Sophie Germain primes.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 06 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2.
This implies that 6*n-3 with n > 2 can be expressed as a sum of three Sophie Germain primes (i.e., those primes p with 2*p+1 also prime).
We have verified the conjecture for n up to 10^8. Note that any Sophie Germain prime p > 3 has the form 6*k-1.

Examples

			a(4) = 2, since 4 = 1 + 1 + 2 = 2 + 1 + 1, and 6*1-1=5 and 6*2-1=11 are Sophie Germain primes.
a(26) = 1, since 26 = 15 + 2 + 9, and all the five numbers 6*15-1=89, 6*2-1=11, 6*9-1=53, 6*15*2-1=179 and 6*15*9=809 are Sophie Germain primes.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 14 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>3.
This has been verified for n up to 10^8, and it is stronger than A. Murthy's conjecture related to A109909.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Jul 26 2023
The conjecture implies the twin prime conjecture for the following reason: If x_1<...
Zhi-Wei Sun also made some similar conjectures. For example, any integer n>2 not equal to 63 can be written as x+y (x>0, y>0) with 2x-1, 2x+1 and 2xy+1 all prime.
Conjecture verified for n up to 10^9. - Mauro Fiorentini, Jul 26 2023

Examples

			a(22)=1 since 22=4+18 with 3*4-1, 3*4+1 and 4*18-1 all prime.
		

Programs

  • Mathematica
    a[n_]:=a[n]=Sum[If[PrimeQ[3k-1]==True&&PrimeQ[3k+1]==True&&PrimeQ[k(n-k)-1]==True,1,0],{k,1,n-1}]
    Do[Print[n," ",a[n]],{n,1,1000}]
Showing 1-10 of 19 results. Next