OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..815
EXAMPLE
a(3) = 167 because the 3 primes starting with 167 are 167, 173 and 179, and 167*173*179+1+6+7+1+7+3+1+7+9 = 5171531 which is prime, and no smaller prime works.
MAPLE
P:= [seq(ithprime(i), i=1..10^5)]:
sd:= n -> convert(convert(n, base, 10), `+`):
S:= map(sd, P):
f:= proc(n)
local p, s, i;
p:= mul(P[i], i=1..n);
s:= add(S[i], i=1..n);
for i from 1 to 10^5-n do
if isprime(p+s) then return P[i] fi;
p:= p/P[i]*P[i+n];
s:= s - S[i]+S[i+n];
od;
-1
end proc:
map(f, [$1..100]);
CROSSREFS
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Jun 30 2022
STATUS
approved