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

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 13 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 8, and a(n) = 1 only for n = 9, 34, 35.
(ii) For any integer n > 4, there is a prime p < n such that 3*pi(n-p) - 1, 3*pi(n-p) + 1 and 3*pi(n-p) + 5 are all prime. Also, for each integer n > 8, there is a prime p < n such that 3*pi(n-p) - 1, 3*pi(n-p) + 1 and 3*pi(n-p) - 5 are all prime.
(iii) For any integer n > 6, there is a prime p < n such that phi(n-p) - 1 and phi(n-p) + 1 are both prime, where phi(.) is Euler's totient function.

Examples

			a(9) = 1 since 2, pi(9-2) - 1 = 3 and pi(9-2) + 1 = 5 are all prime.
a(34) = 1 since 19, pi(34-19) - 1 = pi(15) - 1 = 5 and pi(34-19) + 1 = pi(15) + 1 = 7 are all prime.
a(35) = 1 since 19, pi(35-19) - 1 = pi(16) - 1 = 5 and pi(35-19) + 1 = pi(16) + 1 = 7 are all prime.
		

Crossrefs

Programs

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

A237815 Number of primes p < n such that the number of Sophie Germain primes among 1, ..., n-p is a Sophie Germain prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 13 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 4.
(ii) For any integer n > 11, there is a prime p < n such that the number of Sophie Germain primes among 1, ..., n-p is a square.
See also A237817 for a similar conjecture involving twin primes.

Examples

			a(5) = 1 since there are exactly two Sophie Germain primes not exceeding 5-2 = 3, and 2 is a Sophie Germain prime.
		

Crossrefs

Programs

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

A238458 Number of primes p < n with 2*P(n-p) + 1 prime, where P(.) is the partition function (A000041).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 27 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2. Also, for each n > 3 there is a prime p < n with 2*P(n-p) - 1 prime.
We have verified the conjecture for n up to 10^5.
See also A238459 for a similar conjecture involving the strict partition function.

Examples

			a(3) = 1 since 2 and 2*P(3-2) + 1 = 2*1 + 1 = 3 are both prime.
a(41) = 1 since 37 and 2*P(41-37) + 1 = 2*5 + 1 = 11 are both prime.
		

Crossrefs

Programs

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

A238459 Number of primes p < n with q(n-p) + 1 prime, where q(.) is the strict partition function (A000009).

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 27 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 2. Also, for each n > 6 there is a prime p < n with q(n-p) - 1 prime.
We have verified the conjecture for n up to 10^5.
See also A238458 for a similar conjecture involving the partition function p(n).

Examples

			a(3) = 1 since 2 and q(3-2) + 1 = 1 + 1 = 2 are both prime.
a(28) = 1 since 17 and q(28-17) + 1 = q(11) + 1 = 12 + 1 = 13 are both prime.
		

Crossrefs

Programs

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

A237838 a(n) = |{0 < k <= n: the number of Sophie Germain primes among 1, ..., k*n is a Sophie Germain prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 14 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1.
See also A237839 for a similar conjecture involving twin primes.

Examples

			a(20) = 1 since 11 is a Sophie Germain prime, and there are exactly 11 Sophie Germain primes among 1, ..., 6*20 (namely, they are 2, 3, 5, 11, 23, 29, 41, 53, 83, 89, 113).
		

Crossrefs

Programs

  • Mathematica
    SG[n_]:=PrimeQ[n]&&PrimeQ[2n+1]
    sg[n_]:=Sum[If[PrimeQ[2*Prime[k]+1],1,0],{k,1,PrimePi[n]}]
    a[n_]:=Sum[If[SG[sg[k*n]],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]

A238646 Number of primes p < n such that the number of squarefree numbers among 1, ..., n-p is prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 02 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3, and a(n) = 1 only for n = 4, 10, 12, 14, 16, 24, 36.
This is analog of the conjecture in A237705 for squarefree numbers.
We have verified the conjecture for n up to 60000.

Examples

			a(10) = 1 since 7 and 3 are both prime, and there are exactly 3 squarefree numbers among 1, ..., 10-7.
a(36) = 1 since 17 and 13 are both prime, and there are exactly 13 squarefree numbers among 1, ..., 36-17 (namely, 1, 2, 3, 5, 6, 7, 10, 11, 13, 14, 15, 17, 19).
		

Crossrefs

Programs

  • Mathematica
    s[n_]:=Sum[If[SquareFreeQ[k],1,0],{k,1,n}]
    a[n_]:=Sum[If[PrimeQ[s[n-Prime[k]]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]
Showing 1-6 of 6 results.