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.

A237817 Number of primes p < n such that r = |{q <= n-p: q and q + 2 are both prime}| and r + 2 are both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 13 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 12.
(ii) For any integer n > 2, there is a prime p < n such that r = |{q <= n-p: q and q + 2 are both prime}| is a square.
See also A237815 for a similar conjecture involving Sophie Germain primes.

Examples

			a(13) = 1 since {q <= 13 - 2: q and q + 2 are both prime} = {3, 5, 11} has cardinality 3, and {3, 3 + 2} is a twin prime pair.
		

Crossrefs

Programs

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

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

A237819 Number of primes p < n such that floor(sqrt(n-p)) is a Sophie Germain prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 13 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5.
(ii) For any integer n > 10, there is a prime p < n such that q = floor(sqrt(n-p)) and q + 2 are both prime.

Examples

			a(6) = 1 since 2, floor(sqrt(6-2)) = 2 and 2*2 + 1 = 5 are all prime.
		

Crossrefs

Programs

  • Mathematica
    f[n_]:=Floor[Sqrt[n]]
    q[n_]:=PrimeQ[f[n]]&&PrimeQ[2*f[n]+1]
    a[n_]:=Sum[If[q[n-Prime[k]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

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

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 13 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 53.

Examples

			a(55) = 2 since 53 is prime and there is exactly 1^3 = 1 Sophie Germain prime not exceeding 55 - 53 = 2, and 2 is prime and there are exactly 2^3 = 8 Sophie Germain primes not exceeding 55 - 2 = 53 (namely, they are 2, 3, 5, 11, 23, 29, 41, 53).
		

Crossrefs

Programs

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