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

A234694 a(n) = |{0 < k < n: p = k + prime(n-k) and prime(p) - p + 1 are both prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 29 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 9. Also, for any integer n > 51 there is a positive integer k < n such that p = k + prime(n-k) and prime(p) + p + 1 are both prime.
(ii) If n > 9 (or n > 21), then there is a positive integer k < n such that m - 1 and prime(m) + m (or prime(m) - m, resp.) are both prime, where m = k + prime(n-k).
(iii) If n > 483, then for some 0 < k < n both prime(m) + m and prime(m) - m are prime, where m = k + prime(n-k).
(iv) If n > 3, then there is a positive integer k < n such that prime(k + prime(n-k)) + 2 is prime.
Clearly, part (i) of the conjecture implies that there are infinitely many primes p with prime(p) - p + 1 (or prime(p) + p + 1) also prime.
See A234695 for primes p with prime(p) - p + 1 also prime.

Examples

			a(5) = 1 since 2 + prime(3) = 7 and prime(7) - 6 = 11 are both prime.
a(25) = 1 since 20 + prime(5) = 31 and prime(31) - 30 = 97 are both prime.
a(27) = 1 since 18 + prime(9) = 41 and prime(41) - 40 = 139 are both prime.
a(45) = 1 since 6 + prime(39) = 173 and prime(173) - 172 = 859 are both prime.
a(49) = 1 since 26 + prime(23) = 109 and prime(109) - 108 = 491 are both prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_,k_]:=k+Prime[n-k]
    q[n_,k_]:=PrimeQ[f[n,k]]&&PrimeQ[Prime[f[n,k]]-f[n,k]+1]
    a[n_]:=Sum[If[q[n,k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A232862 Least positive integer m <= n^2/2 + 3 such that the set {prime(k) - k: k = 1,...,m} contains a complete system of residues modulo n, or 0 if such a number m does not exist.

Original entry on oeis.org

1, 3, 4, 11, 9, 8, 10, 15, 29, 13, 23, 22, 23, 37, 32, 28, 48, 44, 53, 41, 45, 67, 76, 117, 119, 91, 121, 88, 89, 101, 72, 88, 100, 143, 144, 185, 145, 104, 176, 141, 144, 175, 187, 213, 121, 255, 128, 129, 189, 243, 122, 267, 275, 242, 209, 205, 130, 153, 263, 335
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 01 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 0.
Note that a(4) = 11 = 4^2/2 + 3.

Examples

			a(3) = 4 since prime(1) - 1 = prime(2) - 2 = 1, prime(3) - 3 = 2, prime(4) - 4 = 3, and {1,2,3} is a complete system of residues modulo 3.
		

Crossrefs

Programs

  • Mathematica
      L[m_,n_]:=Length[Union[Table[Mod[Prime[k]-k,n],{k,1,m}]]]
    Do[Do[If[L[m,n]==n,Print[n," ",m];Goto[aa]],{m,1,n^2/2+3}];
    Print[n," ",0];Label[aa];Continue,{n,1,60}]

A233529 a(n) = |{0 < k <= n/2: prime(k)*prime(n-k) - 6 is prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 11 2013

Keywords

Comments

Conjectures:
(i) a(n) > 0 for all n > 5. Also, for any n > 5, 2*prime(k)*prime(n-k) - 3 is prime for some 0 < k < n.
(ii) For any n > 1 not among 3, 9, 13, 26, there is a positive integer k < n with prime(k)*prime(n-k) - 2 prime. For any n > 2 not among 8, 23, 33, there is a positive integer k < n with prime(k)*prime(n-k) - 4 prime.

Examples

			a(8) = 1 since prime(4)*prime(4) - 6 = 7*7 - 6 = 43 is prime.
a(10) = 1 since prime(3)*prime(7) - 6 = 5*17 - 6 = 79 is prime.
a(16) = 1 since prime(3)*prime(13) - 6 = 5*41 - 6 = 199 is prime.
a(20) = 1 since prime(7)*prime(13) - 6 = 17*41 - 6 = 691 is prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=n>0&&PrimeQ[n]
    a[n_]:=Sum[If[PQ[Prime[k]*Prime[n-k]-6],1,0],{k,1,n/2}]
    Table[a[n],{n,1,100}]

A233539 a(n) = |{0 < k < n-2: m - 1, m + 1, prime(m) - m and prime(m) + m are all prime with m = phi(k) + phi(n-k)/2}|, where phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 13 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 794.
(ii) For any integer n > 59, there is a positive integer k < n such that m = phi(k) + phi(n-k)/4 is an integer with prime(m) - m and prime(m) + m both prime.
Clearly, part (i) of the conjecture implies that there are infinitely many positive integers m with m - 1, m + 1, prime(m) - m and prime(m) + m all prime.

Examples

			a(21) = 1 since phi(6) + phi(15)/2 = 6 with 6 - 1 = 5, 6 + 1 = 7, prime(6) - 6 = 7 and prime(6) + 6 = 19 all prime.
a(25) = 1 since phi(17) + phi(8)/2 = 18 with 18 - 1 = 17, 18 + 1 = 19, prime(18) - 18 = 43 and prime(18) + 18 = 79 all prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_]:=PrimeQ[n-1]&&PrimeQ[n+1]&&PrimeQ[Prime[n]-n]&&PrimeQ[Prime[n]+n]
    f[n_,k_]:=EulerPhi[k]+EulerPhi[n-k]/2
    a[n_]:=Sum[If[q[f[n,k]],1,0],{k,1,n-3}]
    Table[a[n],{n,1,100}]

A232442 a(n) = |{0 < k < n: m*prime(m) - 1 and m*prime(m) + 1 are both prime with m = sigma(k) + phi(n-k)}|, where sigma(k) is the sum of all positive divisors of k and phi(.) is Euler's totient function.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Jan 14 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 214.
This implies that there are infinitely many twin prime pairs of the special form {m*prime(m) - 1, m*prime(m) + 1}.
We have verified the conjecture for n up to 10^5.

Examples

			a(25) = 1 since sigma(6) + phi(19) = 12 + 18 = 30 with {30*prime(30) - 1, 30*prime(30) + 1} = {3389, 3391} a twin prime pair.
a(100) = 1 since sigma(75) + phi(25) = 124 + 20 = 144 with {144*prime(144) - 1, 144*prime(144) + 1} = {119087, 119089} a twin prime pair.
		

Crossrefs

Programs

  • Mathematica
    sigma[n_]:=DivisorSigma[1,n]
    q[n_]:=PrimeQ[n*Prime[n]-1]&&PrimeQ[n*Prime[n]+1]
    f[n_,k_]:=sigma[k]+EulerPhi[n-k]
    a[n_]:=Sum[If[q[f[n,k]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]

A232891 Least positive integer m <= n^2/2 + 3 such that {k*prime(k): k = 1,...,m} contains a complete system of residues modulo n, or 0 if such a number m does not exist.

Original entry on oeis.org

1, 3, 4, 11, 7, 7, 10, 17, 43, 13, 51, 22, 51, 36, 31, 49, 64, 71, 119, 73, 86, 68, 141, 110, 153, 85, 83, 86, 144, 81, 174, 127, 115, 87, 122, 138, 143, 134, 133, 142, 211, 229, 152, 104, 109, 177, 259, 142, 194, 176, 196, 311, 312, 193, 243, 197, 396, 169, 156, 171
Offset: 1

Views

Author

Zhi-Wei Sun, Dec 02 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0.
(ii) For any positive integer n not equal to 3, the number n*prime(n) + 1 cannot be a power x^m with m > 1.
(iii) There are infinitely many positive integers n with n - 1, n + 1, n + prime(n), n + prime(n)^2, n^2 + prime(n), n^2 + prime(n)^2 all prime.

Examples

			a(3) = 4 since 1*prime(1) = 2, 2*prime(2) === 3*prime(3) == 0 (mod 3), and 4*prime(4) = 28 == 1 (mod 3).
		

Crossrefs

Programs

  • Mathematica
    L[m_,n_]:=Length[Union[Table[Mod[k*Prime[k],n],{k,1,m}]]]
    Do[Do[If[L[m,n]==n,Print[n," ",m];Goto[aa]],{m,1,n^2/2+3}];
    Print[n," ",counterexample];Label[aa];Continue,{n,1,60}]

A259628 Numbers m with m-1, m+1, prime(m)+2, prime(m)-m, prime(m)+m, m*prime(m)-1 and m*prime(m)+1 all prime.

Original entry on oeis.org

2523708, 6740478, 6759030, 14655522, 22885698, 28384200, 44630148, 71742300, 87002328, 87466500, 89842200, 153110622, 153647490, 184373490, 283232040, 312124920, 366318960, 408770670, 412216920, 439429128, 456486030, 486730398, 517602600, 606159978, 607942848, 675661080, 855983352, 869593998, 923864562, 971400672
Offset: 1

Views

Author

Zhi-Wei Sun, Jul 01 2015

Keywords

Comments

Conjecture: The sequence contains infinitely many terms.
This is stronger than the conjectures in A232861 and A259539.

Examples

			a(1) = 2523708 since the seven numbers 2523707, 2523709, prime(2523708)+2 = 41578739+2 = 41578741, prime(2523708)-2523708 = 41578739-2523708 = 39055031, prime(2523708)+2523708 = 41578739+2523708 = 44102447, 2523708*prime(2523708)-1 = 2523708*41578739-1 = 104932596244211 and 2523708*prime(2523708)+1 = 2523708*41578739+1 = 104932596244213 are all prime.
		

References

  • Zhi-Wei Sun, Problems on combinatorial properties of primes, in: M. Kaneko, S. Kanemitsu and J. Liu (eds.), Number Theory: Plowing and Starring through High Wave Forms, Proc. 7th China-Japan Seminar (Fukuoka, Oct. 28-Nov. 1, 2013), Ser. Number Theory Appl., Vol. 11, World Sci., Singapore, 2015, pp. 169-187.

Crossrefs

Programs

  • Mathematica
    TW[n_]:=PrimeQ[n-1]&&PrimeQ[n+1]
    n=0;Do[If[PrimeQ[Prime[k]+2]&&PrimeQ[Prime[Prime[k]+1]+2]&&PrimeQ[Prime[Prime[k]+1]-Prime[k]-1]&&PrimeQ[Prime[Prime[k]+1]+Prime[k]+1]&&TW[(Prime[k]+1)Prime[Prime[k]+1]],n=n+1;Print[n," ",Prime[k]+1]],{k,1,5*10^7}]
    allprQ[n_]:=Module[{p=Prime[n]},AllTrue[{n-1,n+1,p+2,p-n,p+n,n*p-1, n*p+1}, PrimeQ]]; Select[Range[98*10^7],allprQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Jan 26 2016 *)
Showing 1-7 of 7 results.