OFFSET
1,1
COMMENTS
Equivalently, integers n such that sigma(n) = i*j for some i,j with prime(i)+prime(j) = n. Each term is necessarily even, otherwise if n is odd n=2+q < sigma(2+q) = pi(2)*pi(q) = pi(q) < q which is absurd. Also p and q cannot be equal, otherwise sigma(2*p) = 3*(p+1) = pi(p)^2 with no solution.
Conjecture: the sequence is infinite and each term has only one decomposition into a sum of suitable primes p,q.
Using Rosser's theorem we can show that the primes p,q >= 19 and each of them can only occur for a finite number of terms n. - Robert Israel, Jun 30 2016
LINKS
Eric Weisstein's World of Mathematics, Rosser's Theorem
FORMULA
Integers n such that sigma(n) = pi(q) * pi(n-q) for some prime q.
EXAMPLE
92 = 19 + 73 with pi(19) * pi(73) = 8 * 21 = 168 = sigma(92).
MAPLE
N:= 10^6: # to use primes up to N
Primes:= select(isprime, [2, seq(i, i=3..N, 2)]):
filter:= proc(n) local s, i, j;
s:= numtheory:-sigma(n);
for i in select(`>=`, numtheory:-divisors(s), ceil(sqrt(s))) minus {s} do
if i > nops(Primes) then return FAIL
elif Primes[i] + Primes[s/i] = n then return true fi
od:
false
end proc:
A:= NULL:
for n from 2 by 2 do
v:= filter(n);
if v = FAIL then break
elif v then A:= A, n
fi
od:
A; # Robert Israel, Jun 30 2016
MATHEMATICA
Select[Range[10^3], Function[n, Length@ Select[Transpose@ {#, n - #} &@ Range[Floor[n/2]], And[Times @@ Boole@ PrimeQ@ {First@ #, Last@ #} == 1, DivisorSigma[1, First@ # + Last@ #] == PrimePi[First@ #] PrimePi[Last@ #]] &] > 0]] (* Michael De Vlieger, Jun 30 2016 *)
PROG
(Sage) def sol(n): return [j for j in divisors(sigma(n)) if j^2<= sigma(n) and is_prime(n-nth_prime(j)) and j * prime_pi(n-nth_prime(j))==sigma(n)]
v=[n for n in range(2, 100000, 2) if sol(n)]
print('list_n =', v)
w=[sigma(n) for n in v]; print('list_sigma(n) =', w)
list_pi(p)=flatten([sol(n) for n in range(2, 100000, 2) if sol(n)])
print('list_pi(p) =', list_pi(p))
list_pi(q)=[w[n]/list_pi[n] for n in range(len(v))]
print('list_pi(q) =', list_pi(q))
(PARI) is(n) = if(n%2==1, return(0), my(x=n-1, y=1); while(x > y, if(ispseudoprime(x) && ispseudoprime(y) && sigma(x+y)==primepi(x)*primepi(y), return(1)); x--; y++); return(0)) \\ Felix Fröhlich, Jun 28 2016
(PARI) is(n) = my( d=divisors(sigma(n))); for(i=1, ceil(#d/2), if(prime(d[i]) + prime(d[#d + 1-i]) == n, return(1))); return(0) \\ David A. Corneth, Jun 30 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Giuseppe Coppoletta, Jun 20 2016
STATUS
approved