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.

A272861 Sum of two integers when equal to the product of their prime-counting functions.

Original entry on oeis.org

12, 16, 18, 20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60, 64, 68, 72, 76, 80, 84, 88, 92, 96, 116, 120, 280, 310, 325, 330, 942, 948, 954, 960, 966, 972, 984, 990, 996, 2968, 3003, 8224, 8232, 8240, 8248, 8280, 8288, 8304, 8312, 8360, 8408, 23499, 23508, 23589
Offset: 1

Views

Author

Giuseppe Coppoletta, Jun 18 2016

Keywords

Comments

The sums are listed in increasing order. The only term with equal addends is a(2)= 16 = 8 + 8 = pi(8)^2, Indeed j=8 is the only solution to pi(j)^2 = 2*j, which is easily seen using pi(j) > j/log(j) for j>16.

Examples

			32 is a term because 32 = 10 + 22 = 4 * 8 = pi(10) * pi(22).
		

Crossrefs

Programs

  • Mathematica
    nn = 10^3; Select[Range@ nn, Function[k, IntegerQ@ SelectFirst[Range@ nn, k == PrimePi[#] PrimePi[k - #] &]]] (* Version 10, or *)
    Select[Range[10^3], Function[n, Length@ Select[Transpose@ {#, n - #} &@ Range[Floor[n/2]], n == PrimePi[First@ #] PrimePi[Last@ #] &] > 0]] (* Michael De Vlieger, Jun 30 2016 *)
  • Sage
    def g(n): return [k for k in (3..n/2) if n==prime_pi(k)*prime_pi(n-k)]
    [n for n in range(2,1000) if len(g(n))>0]

Formula

Positive integers n such that n = pi(j) * pi(n-j) for some j.

Extensions

a(50)-a(53) from Giovanni Resta, Jun 29 2016