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.

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

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

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