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

A239430 Number of ways to write n = k + m with k > 0 and m > 0 such that pi(2*k) - pi(k) is prime and pi(2*m) - pi(m) is a square, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Mar 20 2014

Keywords

Comments

Conjecture: a(n) > 0 for all n > 4, and a(n) = 1 only for n = 5, 6, 20.

Examples

			a(5) = 1 since 5 = 4 + 1 with pi(2*4) - pi(4) = 4 - 2 = 2 prime and pi(2*1) - pi(1) = 1^2.
a(20) = 1 since 20 = 8 + 12 with pi(2*8) - pi(8) = 6 - 4 = 2 prime and pi(2*12) - pi(12) = 9 - 5 = 2^2.
		

Crossrefs

Programs

  • Mathematica
    SQ[n_]:=IntegerQ[Sqrt[n]]
    s[n_]:=SQ[PrimePi[2n]-PrimePi[n]]
    p[n_]:=PrimeQ[PrimePi[2n]-PrimePi[n]]
    a[n_]:=Sum[If[p[k]&&s[n-k],1,0],{k,1,n-1}]
    Table[a[n],{n,1,80}]

A240604 Primes p with pi(p), pi(2*p), pi(3*p) and pi(4*p) all prime, where pi(x) denotes the number of primes not exceeding x.

Original entry on oeis.org

10909, 67247, 185869, 408379, 511111, 1297061, 1730461, 1732333, 2135347, 2266079, 2316203, 2978917, 3477737, 4337257, 4495739, 4691849, 6108461, 6407971, 6591163, 7462589, 7909507, 8165039, 8298337, 8948509, 11144083, 11961373, 15019049, 16074059, 16732561, 19316263
Offset: 1

Views

Author

Zhi-Wei Sun, Apr 09 2014

Keywords

Comments

Conjecture: For any positive integer n, there are infinitely many primes p with pi(k*p) (k = 1,...,n) all prime.

Examples

			a(1) = 10909 with 10909, pi(10909) = 1327, pi(2*10909) = 2447, pi(3*10909) = 3511 and pi(4*10909) = 4547 all prime.
		

Crossrefs

Programs

  • Mathematica
    p[j_,k_]:=p[j,k]=PrimeQ[PrimePi[j*Prime[Prime[k]]]]
    p[k_]:=p[k]=p[2,k]&&p[3,k]&&p[4,k]
    m=0;Do[If[p[k],m=m+1;Print[m," ",Prime[Prime[k]]]],{k,1,95041}]
Showing 1-2 of 2 results.