OFFSET
1,1
COMMENTS
LINKS
T. D. Noe, Table of n, a(n) for n = 1..201
FORMULA
For any n>1, a(n) is prime and a(n) > a(n-1). a(n) is the smallest prime for which a(1)//a(2)//...//a(n) is prime. // denotes concatenation.
EXAMPLE
E.g. a(5)=47 since this is the smallest prime>a(4) which, when concatenated with the concatenation of a(1) to a(4) (=231131), also yields a prime, in this case 23113147.
MAPLE
with(numtheory): pout := [2]: nout := [1]: for n from 2 to 5000 do: p := ithprime(n): d := parse(cat(seq(pout[i], i=1..nops(pout)), p)): if (isprime(d)) then pout := [op(pout), p]: nout := [op(nout), n]: fi: od: pout;
MATHEMATICA
f[s_List] := Block[{p=NextPrime@s[[-1]], pp=FromDigits@Flatten[IntegerDigits/@s]}, While[!PrimeQ[pp*10^Floor[Log[10, p]+1]+p], p=NextPrime@p]; Append[s, p]]; Nest[f, {2}, 40]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Mark Hudson (mrmarkhudson(AT)hotmail.com), Jan 31 2003
STATUS
approved