OFFSET
1,1
COMMENTS
Next term a(44)=10^348-32 (only probable prime with 15324 digits). a(110)=9999968. If n is divisible by 22 then either a(n)=0 or a(n)=10^x-b for some b<n. - Jens Kruse Andersen, Feb 03 2003
LINKS
Carlos Rivera, Puzzle 78. The least prime by concatenating K consecutive integers, The Prime Puzzles and Problems Connection.
EXAMPLE
For n = 7 we have a(7) = 7 so the seven consecutive ascending numbers 7,8,9,10,11,12 and 13 concatenated together gives the smallest possible prime of this form, 78910111213.
PROG
(PARI) isok(vc) = {my(x=""); for (i=1, #vc, x = concat(x, Str(vc[i]))); ispseudoprime(eval(x)); }
a(n) = if (n % 3, for(i=1, oo, my(vc = vector(n, k, k+i-1)); if (isok(vc), return(i))), 0); \\ Michel Marcus, Mar 04 2021
CROSSREFS
KEYWORD
nonn,base,hard
AUTHOR
Patrick De Geest, Jan 15 2000
EXTENSIONS
Terms a(7)-a(43) calculated by Carlos Rivera and Felice Russo
STATUS
approved