OFFSET
1,1
COMMENTS
All terms after 3 must have the form 6k + 1. - Mauro Fiorentini, Mar 27 2024
EXAMPLE
a(1)=2, the next prime is 3 and when 2 and 3 are concatenated we get 23, another prime. Hence a(2)=3. Likewise, a(3)=7 because 37 is prime, whereas the next prime after 3 is "5" which would lead to the nonprime "35".
MAPLE
pout := [2]: nout := [1]: for n from 2 to 1000 do: p := ithprime(n): d := parse(cat(pout[nops(pout)], p)): if (isprime(d)) then pout := [op(pout), p]: nout := [op(nout), n]: fi: od:
MATHEMATICA
t = {i = 2}; Do[While[! PrimeQ[FromDigits[Flatten[IntegerDigits[{Last[t], x = Prime[i]}]]]], i++]; AppendTo[t, x], {49}]; t (* Jayanta Basu, Jul 03 2013 *)
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Amarnath Murthy, Aug 09 2002
EXTENSIONS
More terms from Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 31 2003
STATUS
approved