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.

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

A237840 a(n) = |{0 < k <= n: the number of twin prime pairs not exceeding k*n is a square}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 14 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 0, and a(n) = 1 for no n > 159.
(ii) For every n = 1, 2, 3, ..., there is a positive integer k <= n such that the number |{{p, 2*p+1}: both p and 2*p + 1 are primes not exceeding k*n}| is a square.
We have verified that a(n) > 0 for all n = 1, ..., 22000.
See also A237879 for the least k among 1, ..., n such that the number of twin prime pairs not exceeding k*n is a square.

Examples

			a(4) = 1 since the number of twin prime pairs not exceeding 1*4 = 4 is 0^2.
a(9) = 1 since there are exactly 2^2 twin prime pairs not exceeding 3*9 = 27 (namely, they are {3, 5}, {5, 7}, {11, 13} and {17, 19}).
a(18055) > 0 since there are exactly 675^2 = 455625 twin prime pairs not exceeding 5758*18055 = 103960690.
a(18120) > 0 since there are exactly 729^2 = 531441 twin prime pairs not exceeding 6827*18120 = 123705240.
a(18307) > 0 since there are exactly 681^2 = 463761 twin prime pairs not exceeding 5792*18307 = 106034144.
a(18670) > 0 since there are exactly 683^2 = 466489 twin prime pairs not exceeding 5716*18670 = 106717720.
a(19022) > 0 since there are exactly 737^2 = 543169 twin prime pairs not exceeding 6666*19022 = 126800652.
a(19030) > 0 since there are exactly 706^2 = 498436 twin prime pairs not exceeding 6045*19030 = 115036350.
a(19805) > 0 since there are exactly 717^2 = 514089 twin prime pairs not exceeding 6015*19805 = 119127075.
a(19939) > 0 since there are exactly 1000^2 = 10^6 twin prime pairs not exceeding 12660*19939 = 252427740.
a(20852) > 0 since there are exactly 747^2 = 558009 twin prime pairs not exceeding 6268*20852 = 130700336.
a(21642) > 0 since there are exactly 724^2 = 524176 twin prime pairs not exceeding 5628*21642 = 121801176.
		

Crossrefs

Programs

  • Mathematica
    tw[0]:=0
    tw[n_]:=tw[n-1]+If[PrimeQ[Prime[n]+2],1,0]
    SQ[n_]:=IntegerQ[Sqrt[tw[PrimePi[n]]]]
    a[n_]:=Sum[If[SQ[k*n-2],1,0],{k,1,n}]
    Table[a[n],{n,1,80}]

A237839 a(n) = |{0 < k <= n: q = |{p <= k*n: p and p + 2 are both prime}| and q + 2 are both prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 14 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 3, and a(n) = 1 only for n = 5, 9, 25, 77, 104.
See also A237838 for a similar conjecture involving Sophie Germain primes.

Examples

			a(9) = 1 since {p <= 4*9: p and p + 2 are both prime} = {3, 5, 11, 17, 29} has cardinality 5 and {5, 7} is a twin prime pair.
		

Crossrefs

Programs

  • Mathematica
    TQ[n_]:=PrimeQ[n]&&PrimeQ[n+2]
    tq[n_]:=Sum[If[PrimeQ[Prime[k]+2],1,0],{k,1,PrimePi[n]}]
    a[n_]:=Sum[If[TQ[tq[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}]
Showing 1-4 of 4 results.