login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A355369
a(n) is the least prime p such that the sum of the product of the n consecutive primes starting with p and the decimal digits of those primes is prime.
1
11, 2, 167, 2, 19, 5, 911, 2, 61, 59, 919, 29, 337, 919, 983, 29, 541, 311, 1721, 359, 757, 419, 877, 61, 59, 151, 16943, 1637, 1439, 71, 3739, 557, 443, 1303, 353, 569, 2381, 97, 2389, 5519, 617, 1381, 89, 7, 1103, 733, 409, 521, 499, 283, 911, 709, 5113, 179, 9157, 3533, 971, 47, 3191, 3917
OFFSET
1,1
LINKS
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
Sequence in context: A160464 A038316 A139311 * A140749 A010188 A309389
KEYWORD
nonn,base
AUTHOR
J. M. Bergot and Robert Israel, Jun 30 2022
STATUS
approved