OFFSET
1,1
COMMENTS
a(n) is the number of semiprimes in A143958 whose least prime factor is prime(n).
The least n for which a(n)=0 is 7511.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
For n=3, prime(3)=5; 5^2-1 has 5 divisors d such that 5+d is prime, namely 2, 6, 8, 12, 24. Thus a(3)=5.
MAPLE
f:= proc(p) nops(select(t -> isprime(p+t), numtheory:-divisors(p^2-1))) end proc:
map(f, [seq(ithprime(i), i=1..100)]);
MATHEMATICA
Table[DivisorSum[p^2 - 1, 1 &, PrimeQ[p + #] &], {p, Prime@ Range@ 82}] (* Michael De Vlieger, Nov 27 2017 *)
PROG
(PARI) a(n) = sumdiv(prime(n)^2-1, d, isprime(prime(n)+d)); \\ Michel Marcus, Nov 30 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Robert Israel, Nov 27 2017
STATUS
approved