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.

A237578 a(n) = |{0 < k < n: pi(k*n) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 09 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2, and a(n) = 1 only for n = 5, 8, 13. Moreover, for each n = 1, 2, 3, ..., there is a positive integer k < 3*sqrt(n) + 3 with pi(k*n) prime.
Note that the least positive integer k with pi(k*38) prime is 21 < 3*sqrt(38) + 3 < 21.5.

Examples

			a(5) = 1 since pi(1*5) = 3 is prime.
a(8) = 1 since pi(4*8) = 11 is prime.
a(13) = 1 since pi(10*13) = pi(130) = 31 is prime.
a(38) = 3 since pi(21*38) = pi(798) = 139, pi(28*38) = pi(1064) = 179 and pi(31*38) = pi(1178) = 193 are all prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[PrimePi[k*n]],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A237497 a(n) = |{0 < k <= n/2: pi(k*(n-k)) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 08 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 10, and a(n) = 1 for no n > 51. Moreover, for any integer n > 10, there is a positive integer k < n with 2*k + 1 and pi(k*(n-k)) both prime.

Examples

			a(6) = 1 since 6 = 1 + 5 with pi(1*5) = 3 prime.
a(8) = 1 since 8 = 2 + 6 with pi(2*6) = pi(12) = 5 prime.
a(25) = 1 since 25 = 4 + 21 with pi(4*21) = pi(84) = 23 prime.
a(51) = 1 since 51 = 14 + 37 with pi(14*37) = pi(518) = 97 prime.
		

Crossrefs

Programs

  • Mathematica
    p[k_,m_]:=PrimeQ[PrimePi[k*m]]
    a[n_]:=Sum[If[p[k,n-k],1,0],{k,1,n/2}]
    Table[a[n],{n,1,80}]

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

A237582 a(n) = |{0 < k < n: pi(n + k^2) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 09 2014

Keywords

Comments

Conjecture: (i) For each a = 2, 3, ... there is a positive integer N(a) such that for any integer n > N(a) there is a positive integer k < n with pi(n + k^a) prime. In particular, we may take (N(2), N(3), ..., N(9)) = (1, 1, 9, 26, 8, 9, 18, 1).
(ii) If n > 6, then pi(n^2 + k^2) is prime for some 0 < k < n. If n > 27, then pi(n^3 + k^3) is prime for some 0 < k < n. In general, for each a = 2, 3, ..., if n is sufficiently large then pi(n^a + k^a) is prime for some 0 < k < n.
For any integer n > 1, it is easy to show that pi(n + k) is prime for some 0 < k < n.

Examples

			a(5) = 1 since pi(5 + 1^2) = 3 is prime.
a(6) = 1 since pi(6 + 5^2) = pi(31) = 11 is prime.
a(9) = 2 since pi(9 + 3^2) = pi(18) = 7 and pi(9 + 5^2) = pi(34) = 11 are both prime.
a(12) = 1 since pi(12 + 10^2) = pi(112) = 29 is prime.
		

Crossrefs

Programs

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

A237595 a(n) = |{1 <= k <= n: n + pi(k^2) is prime}|, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 09 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) If n > 1 then n + pi(k*(k-1)) is prime for some k = 1, ..., n.
(iii) For any integer n > 1, there is a positive integer k <= (n+1)/2 such that pi(n + k*(k+1)/2) is prime.
(iv) Any integer n > 1 can be written as p + pi(k*(k+1)/2), where p is a prime and k is among 1, ..., n-1.

Examples

			a(2) = 1 since 2 + pi(1^2) = 2 is prime.
a(6) = 1 since 6 + pi(6^2) = 6 + 11 = 17 is prime.
a(10) = 1 since 10 + pi(5^2) = 10 + 9 = 19 is prime.
a(21) = 2 since 21 + pi(2^2) = 23 and 21 + pi(9^2) = 43 are both prime.
a(24) = 1 since 24 + pi(21^2) = 24 + 85 = 109 is prime.
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=Sum[If[PrimeQ[n+PrimePi[k^2]],1,0],{k,1,n}]
    Table[a[n],{n,1,70}]
Showing 1-5 of 5 results.