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

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

A219842 Number of ways to write n as x+y (0

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 29 2012

Keywords

Comments

Conjecture: a(n)>0 for all n>1. Moreover, any integer n>357 can be written as x+y (x>0, y>0) with 2x*y+1 and 2x*y-1 twin primes.
This conjecture has been verified for n up to 10^8, and it implies the twin prime conjecture.
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, where x and y are positive integers with 2x*y+m and 2x*y-m both prime.
For example, when m=3,5,7,9,11 it suffices to require that n is greater than 5090, 222, 1785, 548, 603 respectively.

Examples

			a(10)=2 since 10=1+9=3+7 with 2*1*9+1=19 and 2*3*7+1=43 both prime.
		

Crossrefs

Programs

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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 28 2012

Keywords

Comments

Conjecture: a(n)>0 if n is different from 1, 6, 16, 24.
This conjecture has been verified for n up to 10^7. It implies that there are infinitely many primes of the form x^2+1.
Zhi-Wei Sun also made the following general conjecture: For any positive integer k, each sufficiently large integer n cna be written as x+y (x>0, y>0) with (xy)^{2^k}+1 prime.
For example, for k=2,3,4 it suffices to require that n is greater than 22, 386, 748 respectively.

Examples

			a(8)=1 since 8=4+4 with (4*4)^2+1=257 prime.
a(9)=2 since 9=2+7=4+5, and (2*7)^2+1=197 and (4*5)^2+1=401 are prime.
		

Crossrefs

Programs

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

A219838 Number of ways to write n as x + y with 0 < x <= y and (xy)^2 + xy + 1 prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Nov 29 2012

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
This has been verified for n up to 10^8. It implies that there are infinitely many primes of the form x^2 + x + 1.
The author also guesses that any integer n > 1157 can be written as x + y with x and y positive integers, and (x*y)^2 + x*y + 1 and (x*y)^2 + x*y - 1 twin primes.
Zhi-Wei Sun has made the following general conjecture: For each prime p, any sufficiently large integer n can be written as x + y, where x and y are positive integers with ((x*y)^p - 1)/(x*y - 1) prime. (For p = 5, 7 it suffices to require n > 28 and n > 46 respectively.)
Compare this with Sun's another conjecture related to A219791.

Examples

			a(49) = 1 since 49 = 3 + 46 with (3*46)^2 + 3*46 + 1 = 19183 prime.
		

Crossrefs

Programs

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

A219789 Least prime in the form x*y-1 with x > 0, y > 0 and x + y = n > 3.

Original entry on oeis.org

2, 3, 7, 5, 11, 7, 23, 17, 19, 11, 23, 13, 47, 29, 31, 17, 83, 19, 71, 41, 43, 23, 47, 71, 131, 53, 103, 29, 59, 31, 167, 149, 67, 101, 71, 37, 383, 113, 79, 41, 83, 43, 167, 89, 251, 47, 263, 97, 191, 101, 103, 53, 107, 109, 311, 113, 223, 59, 431, 61, 239, 353
Offset: 4

Views

Author

Zhi-Wei Sun, Nov 28 2012

Keywords

Comments

See comments in A091182, A219782 and A219791.

Examples

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

Crossrefs

Programs

  • Mathematica
    Do[Do[If[PrimeQ[k(n-k)-1]==True, Print[n," ",k(n-k)-1]; Goto[aa]], {k,1,n/2}]; Print[n," ",counterexample]; Label[aa]; Continue, {n,4,100}]
    Table[k = 1; While[p = k*(n - k) - 1; k <= n/2 && ! PrimeQ[p], k++]; If[k > n/2, Print["counterexample at n=", n]; p = 0]; p, {n, 4, 100}] (* T. D. Noe, Nov 28 2012 *)
Showing 1-5 of 5 results.