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

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

A238585 Number of primes p < n with prime(p)^2 + (prime(n)-1)^2 prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 unless n divides 6, and a(n) = 1 only for n = 4, 5, 7, 10, 11, 12, 19, 21, 22, 31, 42, 44.
(ii) If n > 2 is not equal to 9, then prime(n)^2 + (prime(p) - 1)^2 is prime for some prime p < n.
(iii) For n > 3, there is a prime p < n with prime(p) + prime(n) + 1 prime. If n > 9 is not equal to 18, then prime(p)^2 + prime(n)^2 - 1 is prime for some prime p < n.

Examples

			a(7) = 1 since 3 and prime(3)^2 + (prime(7)-1)^2 = 5^2 + 16^2 = 281 are both prime.
a(44) = 1 since 23 and prime(23)^2 + (prime(44)-1)^2 = 83^2 + 192^2 = 43753 are both prime.
		

Crossrefs

Programs

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

A238643 Number of primes p <= n such that 2*pi(p) - (-1)^n and p*n +((-1)^n - 3)/2 are both prime, where pi(x) is the number of primes not exceeding x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 01 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2.
(ii) If n > 2, then 2*p*n + 1 (or 2*p*n - 1) is prime for some prime p < n.
Part (i) of the conjecture is a further extension of the conjecture in A238597 to cover the even case.

Examples

			a(9) = 1 since 5, 2*pi(5)-(-1)^9 = 2*3 + 1 = 7 and 5*9 + ((-1)^9-3)/2 = 45 - 2 = 43 are all prime.
a(10) = 1 since 3, 2*pi(3)-(-1)^(10) = 2*2 - 1 = 3 and 3*10 + ((-1)^(10)-3)/2 = 30 - 1 = 29 are all prime.
a(268) = 1 since 23, 2*pi(23) - 1`= 2*9 - 1 = 17 and 23*268 - 1 = 6163 are all prime.
a(389) = 1 since 71, 2*pi(71) + 1 = 2*20 + 1 = 41 and 71*389 - 2 = 27617 are all prime.
		

Crossrefs

Programs

  • Mathematica
    p[n_,k_]:=PrimeQ[2k-(-1)^n]&&PrimeQ[n*Prime[k]+((-1)^n-3)/2]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,PrimePi[n]}]
    Table[a[n],{n,1,80}]
Showing 1-3 of 3 results.