OFFSET
1,2
COMMENTS
These terms are primes: a(7), a(19), a(989), a(1187), a(4183); see A267237.
FORMULA
a(n) = (10^(n+1)*(n-1) - n + 10) / 9 (n <= 9).
a(n) = Sum_{i=0...n+1} (n*10^(i*(floor(log(10, n+1)) + 1))) + 1 (n <> 10^k, k > 0), i.e. doesn't give correctly the terms ending with 0.
EXAMPLE
a(3) = 2223 ('3-1' prepended 3 times to '3').
MATHEMATICA
Table[ FromDigits[ StringJoin@@ ToString/@ PadLeft[{n}, n+1, n-1]], {n, 50}](* Or *)
FromDigits/@ Table[ Nest[ ToString[n] <> #&, ToString[n+1], n+1], {n, 0, 50}]
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Mikk Heidemaa, Jan 13 2016
STATUS
approved