OFFSET
1,1
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.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..320 (terms < 4*10^9)
Eric Weisstein's World of Mathematics, Prime Counting Function
FORMULA
Positive integers n such that n = pi(j) * pi(n-j) for some j.
EXAMPLE
32 is a term because 32 = 10 + 22 = 4 * 8 = pi(10) * pi(22).
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 *)
PROG
(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]
CROSSREFS
KEYWORD
nonn
AUTHOR
Giuseppe Coppoletta, Jun 18 2016
EXTENSIONS
a(50)-a(53) from Giovanni Resta, Jun 29 2016
STATUS
approved