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.

A238597 Number of primes p < 2*n with 2*pi(p) + 1 and p*(2n-1) - 2 both prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 1, and a(n) = 1 for no n > 195.
(ii) For any integer n > 1, there is a prime p < 2*n with 2*pi(p) + 1 (or 2*pi(p) - 1) and 2*n + p both prime.
Part (i) of this conjecture is an extension of the conjecture in A238580.

Examples

			a(9) = 1 since 5, 2*pi(5) + 1 = 2*3 + 1 = 7 and 5*(2*9-1) - 2 = 5*17 - 2 = 83 are all prime.
a(28) = 1 since 3, 2*pi(3) + 1 = 2*2 + 1 = 5 and 3*(2*28-1) - 2 = 3*55 - 2 = 163 are all prime.
a(195) = 1 since 71, 2*pi(71) + 1 = 2*20 + 1 = 41 and 71*(2*195-1) - 2 = 27617 are all prime.
		

Crossrefs

Programs

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