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-10 of 13 results. Next

A237706 Number of primes p < n with pi(n-p) a square, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 11 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 2, and a(n) = 1 only for n = 3, 5, 6, 7, 8, 16, 17, 22, 23, 148, 149.
(ii) For any integer n > 2, there is a prime p < n with pi(n-p) a triangular number.
We have verified that a(n) > 0 for every n = 3, ..., 1.5*10^7. See A237710 for the least prime p < n with pi(n-p) a square.
See also A237705, A237720 and A237721 for similar conjectures.

Examples

			a(8) = 1 since 7 is prime with pi(8-7) = 0^2.
a(16) = 1 since 7 is prime with pi(16-7) = 2^2.
a(149) = 1 since 139 is prime with pi(149-139) = pi(10) = 2^2.
a(637) = 2 since 409 is prime with pi(637-409) = pi(228) = 7^2, and 613 is prime with pi(637-613) = pi(24) = 3^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    q[n_]:=SQ[PrimePi[n]]
    a[n_]:=Sum[If[q[n-Prime[k]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,70}]

A237768 Number of primes p < n with pi(n-p) a Sophie Germain prime, where pi(.) is given by A000720.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 13 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 4, and a(n) = 1 only for n = 5, 12, 20, 21, 26, 27, 30, 31, 32, 60, 61, 68, 69, 80, 81.
This is stronger than part (i) of the conjecture in A237705.
We have verified that a(n) > 0 for all n = 5, ..., 2*10^7.

Examples

			a(5) = 1 since 2, pi(5-2) = pi(3) = 2 and 2*2 + 1 = 5 are all prime.
a(12) = 1 since 7, pi(12-7) = pi(5) = 3 and 2*3 + 1 = 7 are all prime.
a(81) = 1 since 47, pi(81-47) = pi(34) = 11 and 2*11 + 1 = 23 are all prime.
		

Crossrefs

Programs

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

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

A238278 a(n) = |{0 < k < n: the number of primes in the interval ((k-1)*n, k*n] and the number of primes in the interval (k*n, (k+1)*n] are both prime}|.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 22 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 3.
(ii) For any integer n > 3, there is a prime p < n such that the number of primes in the interval ((p-1)*n, p*n) is a prime.
We have verified part (i) for n up to 150000.
See also A238277 and A238281 for related conjectures.

Examples

			a(17) = 1 since the interval (9*17, 10*17] contains exactly 3 primes with 3 prime, and the interval (10*17, 11*17] contains exactly 3 primes with 3 prime.
		

Crossrefs

Programs

  • Mathematica
    d[k_,n_]:=PrimePi[k*n]-PrimePi[(k-1)n]
    a[n_]:=Sum[If[PrimeQ[d[k,n]]&&PrimeQ[d[k+1,n]],1,0],{k,1,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}]

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

A237720 Number of primes p <= (n+1)/2 with floor( sqrt(n-p) ) prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 12 2014

Keywords

Comments

Conjecture: (i) a(n) > 0 for all n > 5, and a(n) = 1 only for n = 6, 23, 24, 111, 112, ..., 120.
(ii) For any integer n > 2, there is a prime p < n with floor(sqrt(n+p)) prime.
Note that floor(sqrt(n)) is the number of squares among 1, ..., n.
See also A237705, A237706 and A237721 for similar conjectures.

Examples

			a(6) = 1 since 2 and floor(sqrt(6-2)) = 2 are both prime.
a(23) = 1 since 11 and floor(sqrt(23-11)) = 3 are both prime.
a(24) = 1 since 11 and floor(sqrt(24-11)) = 3 are both prime.
a(27) = 2 since 2 and floor(sqrt(27-2)) = 5 are both prime, and 13 and floor(sqrt(27-13)) = 3 are both prime.
a(n) = 1 for n = 111, ..., 116 since 53 and floor(sqrt(n-53)) = 7 are both prime.
a(n) = 1 for n = 117, 118, 119, 120 since 59 and floor(sqrt(n-59)) = 7 are both prime.
		

Crossrefs

Programs

  • Mathematica
    q[n_]:=PrimeQ[Floor[Sqrt[n]]]
    a[n_]:=Sum[If[q[n-Prime[k]],1,0],{k,1,PrimePi[(n+1)/2]}]
    Table[a[n],{n,1,70}]

A237721 Number of primes p <= n with floor( sqrt(n-p) ) a square.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Feb 12 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 1, and a(n) = 1 only for n = 2, 9, 10, 11, 12, 15, 16, 17.
We have verified this for n up to 10^6.
See also A237705, A237706 and A237720 for similar conjectures.

Examples

			a(2) = 1 since 2 is prime with floor(sqrt(2-2)) = 0^2.
a(3) = 2 since 2 is prime with floor(sqrt(3-2)) = 1^2, and 3 is prime with floor(sqrt(3-3)) = 0^2.
a(9) = a(10) = 1 since 7 is prime with floor(sqrt(9-7)) = floor(sqrt(10-7)) = 1^2.
a(11) = 1 since 11 is prime with floor(sqrt(11-11)) = 0^2.
a(12) = 1 since 11 is prime with floor(sqrt(12-11)) = 1^2.
a(15) = a(16) = 1 since 13 is prime with floor(sqrt(15-13)) = floor(sqrt(16-13)) = 1^2.
a(17) = 1 since 17 is prime with floor(sqrt(17-17)) = 0^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    q[n_]:=SQ[Floor[Sqrt[n]]]
    a[n_]:=Sum[If[q[n-Prime[k]],1,0],{k,1,PrimePi[n]}]
    Table[a[n],{n,1,70}]

A238134 Number of primes p < n with q = floor((n-p)/4) and prime(q) - q + 1 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: Let m > 0 and n > 2*m + 1 be integers. If m = 1 and 2 | n, or m = 3 and n is not congruent to 1 modulo 6, or m = 2, 4, 5, ..., then there is a prime p < n such that q = floor((n-p)/m) and prime(q) - q + 1 are both prime.
In the cases m = 1, 2, this gives refinements of Goldbach's conjecture and Lemoine's conjecture (see also A235189). For m > 2, the conjecture is completely new.
See also A238701 for a similar conjecture involving primes q with q^2 - 2 also prime.

Examples

			 a(29) = 3 since 7, floor((29-7)/4) = 5 and prime(5) - 5 + 1 = 11 - 4 = 7 are all prime; 17, floor((29-17)/4) = 3 and prime(3) - 3 + 1 = 5 - 2 = 3 are all prime; 19, floor((29-19)/4) = 2 and prime(2) - 2 + 1 = 3 - 1 = 2 are all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n]&&PrimeQ[Prime[n]-n+1]
    a[n_]:=Sum[If[PQ[Floor[(n-Prime[k])/4]],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]

A238701 Number of primes p < n with q = floor((n-p)/4) and q^2 - 2 both prime.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 03 2014

Keywords

Comments

Conjecture: Let m > 0 and n > 2*m + 1 be integers. If m = 1 and 2 | n, or m = 3 and n is not congruent to 1 modulo 6, or m = 2, 4, 5, ..., then there is a prime p < n with q = floor((n-p)/m) and q^2 - 2 both prime.
In the case m = 1, this is a refinement of Goldbach's conjecture. In the case m = 2, this is stronger than Lemoine's conjecture (cf. A046927). The conjecture for m > 2 seems completely new. We view the conjecture as a natural extension of Goldbach's conjecture.

Examples

			a(11) = 2 since 2, floor((11-2)/4)= 2 and 2^2 - 2 are all prime, and 3, floor((11-3)/4) = 2 and 2^2 - 2 are all prime.
		

Crossrefs

Programs

  • Mathematica
    PQ[n_]:=PrimeQ[n]&&PrimeQ[n^2-2]
    p[n_,k_]:=PQ[Floor[(n-Prime[k])/4]]
    a[n_]:=Sum[If[p[n,k],1,0],{k,1,PrimePi[n-1]}]
    Table[a[n],{n,1,80}]
Showing 1-10 of 13 results. Next