OFFSET
1,1
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..369 (all terms with <= 1000 digits).
EXAMPLE
The first prime > 123, the concatenation of the first three natural numbers, is 127. Hence a(3) = 127.
MAPLE
a:= n-> nextprime(parse(cat($1..n))):
seq(a(n), n=1..19); # Alois P. Heinz, Feb 13 2021
MATHEMATICA
p[n_] := Module[{r, i}, r = 2; i = 1; While[r <= n, i = i + 1; r = Prime[i]]; r]; s = ""; a = {}; Do[s = s <> ToString[Prime[i]]; a = Append[a, p[ToExpression[s]]], {i, 1, 8}]; a
Table[NextPrime[FromDigits[Flatten[IntegerDigits/@Range[n]]]], {n, 20}] (* Harvey P. Dale, Jan 16 2018 *)
PROG
(Python)
from sympy import nextprime
def a(n):
return nextprime(int("".join(map(str, (i for i in range(1, n+1)))))-1)
print([a(n) for n in range(1, 19)]) # Michael S. Branicky, Feb 13 2021
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Joseph L. Pe, Sep 26 2002
EXTENSIONS
More terms from Lior Manor Oct 08 2002
a(18) and beyond from Michael S. Branicky, Feb 13 2021
STATUS
approved