%I #33 Jul 11 2016 12:45:59
%S 12,16,18,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96,
%T 116,120,280,310,325,330,942,948,954,960,966,972,984,990,996,2968,
%U 3003,8224,8232,8240,8248,8280,8288,8304,8312,8360,8408,23499,23508,23589
%N Sum of two integers when equal to the product of their prime-counting functions.
%C 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.
%H Giovanni Resta, <a href="/A272861/b272861.txt">Table of n, a(n) for n = 1..320</a> (terms < 4*10^9)
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PrimeCountingFunction.html">Prime Counting Function</a>
%F Positive integers n such that n = pi(j) * pi(n-j) for some j.
%e 32 is a term because 32 = 10 + 22 = 4 * 8 = pi(10) * pi(22).
%t nn = 10^3; Select[Range@ nn, Function[k, IntegerQ@ SelectFirst[Range@ nn, k == PrimePi[#] PrimePi[k - #] &]]] (* Version 10, or *)
%t 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 *)
%o (Sage) def g(n): return [k for k in (3..n/2) if n==prime_pi(k)*prime_pi(n-k)]
%o [n for n in range(2,1000) if len(g(n))>0]
%Y Cf. A272860, A273286, A000720.
%K nonn
%O 1,1
%A _Giuseppe Coppoletta_, Jun 18 2016
%E a(50)-a(53) from _Giovanni Resta_, Jun 29 2016
|