login
A069628
a(1) = 1; a(2n) = smallest prime starting (most significant digits) with a(2n-1). a(2n+1) = smallest prime ending (least significant digits) in a(2n).
9
1, 11, 211, 2111, 22111, 2211109, 92211109, 9221110901, 29221110901, 2922111090137, 32922111090137, 3292211109013747, 73292211109013747, 7329221110901374771, 157329221110901374771, 15732922111090137477101
OFFSET
1,2
MATHEMATICA
a[n_] := (j = ToString[n]; l = {"1", "3", "7", "9", "01", "03", "07", "09"}; k = 1; While[p = ToExpression[ StringJoin[j, ToString[l[[k]] ]]]; k < 9 && ! PrimeQ[p], k++ ]; If[k < 9, Return[p]]; i = IntegerDigits[n]; k = 11; While[p = FromDigits[Join[i, IntegerDigits[k]]]; ! PrimeQ[p], k++ ]; Return[p]); b[n_] := (i = IntegerDigits[n]; k = 1; While[p = FromDigits[ Join[ IntegerDigits[k], i]]; !PrimeQ[p], k++ ]; Return[p]); f[1] = 1; f[n_] := If[ EvenQ[n], a[f[n - 1]], b[f[n - 1]]]; Table[ f[n], {n, 1, 18}]
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Amarnath Murthy, Mar 27 2002
EXTENSIONS
Edited and extended by Robert G. Wilson v, Apr 03 2002
STATUS
approved