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

A233150 Number of ways to write n = k + m (k, m > 0) with 2^k + prime(m) prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 05 2013

Keywords

Comments

Conjecture: a(n) > 0 except for n = 1, 2, 7.
We have verified this for n up to 3*10^7. For n = 15687374, the least positive integer k with 2^k + prime(n-k) prime is 51299. For n = 28117716, the least positive integer k with 2^k + prime(n-k) prime is 81539.

Examples

			a(9) = 1 since 9 = 7 + 2 with 2^7 + prime(2) = 128 + 3 = 131 prime.
a(13) = 1 since 13 = 3 + 10 with 2^3 + prime(10) = 8 + 29 = 37 prime.
a(588) = 1 since 588 = 66 + 522 with 2^{66} + prime(522) = 2^{66} + 3739 = 73786976294838210203 prime.
a(1012) = 1 since 1012 = 317 + 695 with 2^{317} + prime(695) = 2^{317} + 5231 prime.
		

Crossrefs

Programs

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

A237453 Number of primes p < n with p*n + pi(p) prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4, and a(n) = 1 for no n > 144. Moreover, for any positive integer n, there is a prime p < sqrt(2*n)*log(5n) with p*n + pi(p) prime.
(ii) For each integer n > 8, there is a prime p <= n + 1 with (p-1)*n - pi(p-1) prime.
(iii) For every n = 1, 2, 3, ... there is a positive integer k < 3*sqrt(n) with k*n + prime(k) prime.
(iv) For each n > 13, there is a positive integer k < n with k*n + prime(n-k) prime.
We have verified that a(n) > 0 for all n = 5, ..., 10^8.

Examples

			a(3) = 1 since 2 and 2*3 + pi(2) = 6 + 1 = 7 are both prime.
a(10) = 1 since 5 and 5*10 + pi(5) = 50 + 3 = 53 are both prime.
a(107) = 1 since 89 and 89*107 + pi(89) = 9523 + 24 = 9547 are both prime.
a(144) = 1 since 59 and 59*144 + pi(59) = 8496 + 17 = 8513 are both prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[Prime[k]*n+k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]
  • PARI
    vector(100, n, sum(k=1, primepi(n-1), isprime(prime(k)*n+k))) \\ Colin Barker, Feb 08 2014

A233439 a(n) = |{0 < k < n: prime(k)^2 + 4*prime(n-k)^2 is prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Dec 09 2013

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) For any integer n > 10, prime(j)^3 + 2*prime(n-j)^2 is prime for some 0 < j < n, and prime(k)^3 + 2*prime(n-k)^3 is prime for some 0 < k < n.
(iii) If n > 5, then prime(k)^3 + 2*p(n-k)^3 is prime for some 0 < k < n, where p(.) is the partition function (A000041). If n > 2, then prime(k)^3 + 2*q(n-k)^3 is prime for some 0 < k < n, where q(.) is the strict partition function (A000009).

Examples

			a(4) = 1 since prime(3)^2 + 4*prime(1)^2 = 5^2 + 4*2^2 = 41 is prime.
a(6) = 1 since prime(5)^2 + 4*prime(1)^2 = 11^2 + 4*2^2 = 137 is prime.
a(8) = 1 since prime(3)^2 + 4*prime(5)^2 = 5^2 + 4*11^2 = 509 is prime.
a(16) = 1 since prime(6)^2 + 4*prime(10)^2 = 13^2 + 4*29^2 = 3533 is prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[Prime[k]^2+4*Prime[n-k]^2],1,0],{k,1,n-1}]
    Table[a[n],{n,1,100}]
Showing 1-4 of 4 results.