OFFSET
2,1
EXAMPLE
For n=4, concatenate(2,3,5,7) gives 2357. The closest other primes are 2371 and 2351 and their difference is a(4)=20.
MATHEMATICA
<<NumberTheory`NumberTheoryFunctions` sz[x_] :=FromDigits[Flatten[Table[IntegerDigits[Prime[j]], {j, 1, x}], 1]] Table[NextPrime[sz[w]]-PreviousPrime[sz[w]], {w, 1, 100}]
PROG
(PARI) A019518(n)=my(k=""); forprime(p=2, prime(n), k=Str(k, p)); eval(k)
a(n)=my(k=A019518(n)); nextprime(k+1)-precprime(k-1) \\ Charles R Greathouse IV, Apr 28 2010
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Labos Elemer, Mar 18 2005
EXTENSIONS
Corrected, extended, and edited by Charles R Greathouse IV, Apr 28 2010
STATUS
approved