OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..52
FORMULA
d=3, 4, 5, 6, 7 a(n) = if prime then Sum[d*10^i, {i, 1, m}] + 1
MATHEMATICA
d[n_] = If[2 + Mod[n, 6] > 0, 2 + Mod[n, 6], 1] a = Flatten[Table[Sum[d[k]*10^i, {i, 1, m}] + 1, {m, 1, 50}, {k, 1, 4}]] b = Flatten[Table[If[PrimeQ[a[[i]]] == True, a[[i]], {}], {i, 1, Length[a]}]]
Select[FromDigits/@Flatten[Table[PadLeft[{1}, i, #]&/@{3, 4, 5, 6, 7}, {i, 2, 100}], 1], PrimeQ[#]&] (* Vincenzo Librandi, Dec 12 2011 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Jun 26 2005
STATUS
approved