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

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}]

A233544 Number of ways to write n = k^2 + m with k > 0 and m >= k^2 such that sigma(k^2) + phi(m) is prime, where sigma(k^2) is the sum of all (positive) divisors of k^2, and phi(.) is Euler's totient function (A000010).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 12 2013

Keywords

Comments

Conjectures:
(i) a(n) > 0 for all n > 1.
(ii) Any integer n > 1 can be written as k + m with k > 0 and m > 0 such that sigma(k)^2 + phi(m) (or sigma(k) + phi(m)^2) is prime.
Part (i) of the conjecture is stronger than the conjecture in A232270. We have verified it for n up to 10^8.
I verified the conjecture to 3*10^9. The conjecture is almost surely true. - Charles R Greathouse IV, Dec 13 2013
There are no counterexamples to conjecture (i) < 5.12 * 10^10. - Jud McCranie, Jul 23 2017
The conjectures appeared as Conjecture 3.31 in the linked 2017 paper. - Zhi-Wei Sun, Nov 30 2018

Examples

			a(10) = 1 since 10 = 1^2 + 9 with sigma(1^2) + phi(9) = 1 + 6 = 7 prime.
a(25) = 1 since 25 = 2^2 + 21 with sigma(2^2) + phi(21) = 7 + 12 = 19 prime.
a(34) = 1 since 34 = 4^2 + 18 with sigma(4^2) + phi(18) = 31 + 6 = 37 prime.
a(46) = 1 since 46 = 2^2 + 42 with sigma(2^2) + phi(42) = 7 + 12 = 19 prime.
a(106) = 1 since 106 = 3^2 + 97 with sigma(3^2) + phi(97) = 13 + 96 = 109 prime.
a(163) = 1 since 163 = 3^2 + 154 with sigma(3^2) + phi(154) = 13 + 60 = 73 prime.
a(265) = 1 since 265 = 11^2 + 144 with sigma(11^2) + phi(144) = 133 + 48 = 181 prime.
a(1789) = 1 since 1789 = 1^2 + 1788 with sigma(1^2) + phi(1788) = 1 + 592 = 593 prime.
a(1157) = 3, since 1157 = 10^2 + 1057 with sigma(10^2) + phi(1057) = 217 + 900 = 1117 prime, 1157 = 21^2 + 716 with sigma(21^2) + phi(716) = 741 + 356 = 1097 prime, and 1157 = 24^2 + 581 with sigma(24^2) + phi(581) = 1651 + 492 = 2143 prime. In this example, none of 10, 21 and 24 is a prime power.
		

Crossrefs

Programs

  • Mathematica
    sigma[n_]:=Sum[If[Mod[n,d]==0,d,0],{d,1,n}]
    a[n_]:=Sum[If[PrimeQ[sigma[k^2]+EulerPhi[n-k^2]],1,0],{k,1,Sqrt[n/2]}]
    Table[a[n],{n,1,100}]
  • PARI
    a(n)=sum(k=1,sqrtint(n\2),isprime(sigma(k^2)+eulerphi(n-k^2))) \\ Charles R Greathouse IV, Dec 12 2013

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

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}]

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}]

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

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.

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}]

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

Original entry on oeis.org

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

Author

Zhi-Wei Sun, Dec 21 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>11.
This implies the twin prime conjecture, and it has been verified for n up to 10^9.
Zhi-Wei Sun also made some similar conjectures, for example, any integer n>5 can be written as p+q with p, 2q-3 and 2q+3 all prime, and each integer n>4 can be written as p+q with p, 3q-2+(n mod 2) and 3q+2-(n mod 2) all prime.

Examples

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

Programs

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

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

Original entry on oeis.org

0, 0, 1, 2, 3, 1, 3, 2, 5, 2, 4, 2, 7, 2, 5, 3, 5, 3, 10, 4, 5, 3, 8, 3, 14, 6, 5, 4, 11, 5, 11, 3, 11, 9, 4, 5, 10, 5, 11, 9, 12, 3, 19, 7, 11, 6, 12, 9, 11, 7, 17, 7, 13, 5, 22, 3, 3, 15, 16, 5, 25, 4, 9, 11, 13, 5, 19, 6, 22, 6, 11, 6, 39, 6, 24, 7, 7, 6, 25, 8, 21, 11, 24, 7, 31, 7, 19, 11, 33, 10, 14, 8, 15, 27, 18, 9, 21, 4, 27, 9
Offset: 1

Author

Zhi-Wei Sun, Nov 12 2013

Keywords

Comments

Conjectures:
(i) a(n) > 0 for all n > 2. Also, any integer n > 4 can be written as x + y (x, y > 0) with x^2 * y + 1 prime.
(ii) Each n = 2, 3, ... can be expressed as x + y (x, y > 0) with (x*y)^2 + x*y + 1 prime.
(iii) Also, any integer n > 2 can be written as x + y (x, y > 0) with 2*(x*y)^2 - 1 (or (x*y)^2 + x*y - 1) prime.
From Mauro Fiorentini, Jul 31 2023: (Start)
Both parts of conjecture (i) verified for n up to 10^9.
Conjecture (ii) and both parts of conjecture (iii) verified for n up to 10^7. (End)

Examples

			a(6) = 1 since 6 = 4 + 2 with 4^2*2 - 1 = 31 prime.
		

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[x^2*(n-x)-1],1,0],{x,1,n-1}]
    Table[a[n],{n,1,100}]
Showing 1-10 of 12 results. Next