login
A104759
Concatenation of digits of natural numbers from n down to 1.
21
1, 21, 321, 4321, 54321, 654321, 7654321, 87654321, 987654321, 1987654321, 1987654321, 101987654321, 1101987654321, 11101987654321, 211101987654321, 1211101987654321, 31211101987654321, 131211101987654321
OFFSET
1,2
LINKS
FORMULA
a(n) = A138793(n) mod 10^(n-1). - R. J. Mathar, Sep 17 2011
EXAMPLE
a(11) = a(10) because no number may begin with 0.
a(9)= [123456789]101112131415...=987654321
a(10)=[1234567891]01112131415...=1987654321
a(11)=[12345678910]1112131415...=01987654321=1987654321
a(12)=[123456789101]112131415...=101987654321
a(13)=[1234567891011]12131415...=1101987654321
a(14)=[12345678910111]2131415...=11101987654321
a(15)=[123456789101112]131415...=211101987654321
MATHEMATICA
f[n_] := Block[{t = Reverse@ Flatten@ IntegerDigits@ Range@ n, k}, Reap@ For[k = 1, k <= Length@ t, k++, Sow[FromDigits@ Take[t, -k]]] // Flatten // Rest]; f@ 14 (* Michael De Vlieger, Mar 23 2015 *)
lst = {}; Do[lst = Join[lst, IntegerDigits[n]], {n, 1, 100}]; Table[FromDigits[Reverse[lst[[Range[1, n]]]]], {n, 1, Length[lst]}] (* Robert Price, Mar 24 2015 *)
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Alexandre Wajnberg & Juliette Bruyndonckx, Apr 23 2005
STATUS
approved