OFFSET
1,1
COMMENTS
Also pi(q) for primes q verifying p+q = pi(p)*pi(q) for some prime p <= q.
The list of products i*j gives A272860. See also comments there.
LINKS
Giuseppe Coppoletta, Table of n, a(n) for n = 1..43
EXAMPLE
8 is a term as prime(3) + prime(8) = 3*8.
MATHEMATICA
Select[Range[3000], Function[j, Total@ Boole@ Map[Prime@ # + Prime@ j == # j &, Range@ j] > 0]] (* Michael De Vlieger, Jul 28 2016 *)
PROG
(Sage) def sol(n):
if n<5: a=n
else: a=exp(n+1)/(n+1)
b=(n-1)/n^2*exp(n^2/(n-1.1))
return [j for j in range(a, b) if is_prime(n*j-nth_prime(n)) and prime_pi(n*j-nth_prime(n))==j]
flatten([sol(i) for i in (1..15) if len(sol(i))>0]) #
(PARI) is(n) = for(i=1, n, if(prime(i)+prime(n)==i*n, return(1))); return(0) \\ Felix Fröhlich, Jul 27 2016
(PARI) is(n, p=prime(n))=my(i); forprime(q=2, p, if(i++*n==p+q, return(1))); 0
v=List(); n=0; forprime(p=2, 1e6, if(is(n++, p), listput(v, n))); Vec(v) \\ Charles R Greathouse IV, Jul 28 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Giuseppe Coppoletta, Jul 25 2016
STATUS
approved