OFFSET
1,3
COMMENTS
All terms are even.
Conjecture: a(n) > 0 for n >= 3.
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 48 because A001414(48) = 11 = prime(5) and 48+11 = 59 is prime, and 48 is the least composite that works for this prime.
MAPLE
spf:= proc(n) local t;
add(t[1]*t[2], t=ifactors(n)[2])
end proc:
N:= 500: # for a(1)..a(N)
count:= 2:
V:= Vector(N):
for k from 4 by 2 while count < N do
if isprime(k) then next fi;
p:= spf(k);
if isprime(p) then
m:= numtheory:-pi(p);
if m <= N and V[m] = 0 and isprime(p+k) then
V[m]:= k; count:= count+1;
fi
fi
od:
convert(V, list);
MATHEMATICA
sopfr[1] = 0; sopfr[n_] := Plus @@ Times @@@ FactorInteger[n]; seq[max_] := Module[{s = Table[0, {max}], c = 2, k = 3, p, ip}, While[c < max, k++; If[CompositeQ[k] && PrimeQ[(p = sopfr[k])] && PrimeQ[k + p] && (ip = PrimePi[p]) <= max && s[[ip]] == 0, c++; s[[ip]] = k]]; s]; seq[50] (* Amiram Eldar, Jul 22 2021 *)
PROG
(PARI) sopfr(n) = (n=factor(n))[, 1]~*n[, 2]; \\ A001414
a(n) = if (n<=2, return(0)); my(p=prime(n)); forcomposite(k=2, , if ((sopfr(k)==p) && isprime(k+p), return (k))); \\ Michel Marcus, Jul 22 2021
CROSSREFS
KEYWORD
nonn,look
AUTHOR
J. M. Bergot and Robert Israel, Jul 20 2021
STATUS
approved