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”).

A309191
a(n) is the least prime such that each concatenation of 1 <= k <= n consecutive primes beginning with a(n) is prime, or 0 if no such prime exists.
2
2, 2, 31, 4603, 910307, 352367441, 23908162969, 483148266971
OFFSET
1,1
LINKS
Carlos Rivera, Puzzle 708 Find sets of k consecutive primes such that ..., The Prime Puzzles & Problems Connection.
EXAMPLE
a(2)=2; 2, 3 are 2 consecutive primes and their concatenation 23 is also prime.
a(3)=31 since 31, 37, and 41 are 3 consecutive primes and 3137 and 313741 are both prime.
MATHEMATICA
a[n_] := Block[{p = Prime@ Range@ n}, While[! AllTrue[Range[2, n], PrimeQ@ FromDigits@ Flatten@ IntegerDigits@ Take[p, #] &], p = Append[ Rest@ p, NextPrime@ Last@ p]]; p[[1]]]; Array[a, 5] (* Giovanni Resta, Jul 16 2019 *)
CROSSREFS
Cf. A030996.
Sequence in context: A276821 A267726 A371562 * A372305 A353911 A303568
KEYWORD
nonn,base,more
AUTHOR
Jean-Marc Rebert, Jul 16 2019
STATUS
approved