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”).
%I #8 Jun 30 2022 14:45:12
%S 11,2,167,2,19,5,911,2,61,59,919,29,337,919,983,29,541,311,1721,359,
%T 757,419,877,61,59,151,16943,1637,1439,71,3739,557,443,1303,353,569,
%U 2381,97,2389,5519,617,1381,89,7,1103,733,409,521,499,283,911,709,5113,179,9157,3533,971,47,3191,3917
%N 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.
%H Robert Israel, <a href="/A355369/b355369.txt">Table of n, a(n) for n = 1..815</a>
%e 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.
%p P:= [seq(ithprime(i),i=1..10^5)]:
%p sd:= n -> convert(convert(n,base,10),`+`):
%p S:= map(sd, P):
%p f:= proc(n)
%p local p,s,i;
%p p:= mul(P[i],i=1..n);
%p s:= add(S[i],i=1..n);
%p for i from 1 to 10^5-n do
%p if isprime(p+s) then return P[i] fi;
%p p:= p/P[i]*P[i+n];
%p s:= s - S[i]+S[i+n];
%p od;
%p -1
%p end proc:
%p map(f, [$1..100]);
%K nonn,base
%O 1,1
%A _J. M. Bergot_ and _Robert Israel_, Jun 30 2022