OFFSET
1,2
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
EXAMPLE
a(3)=123.
MAPLE
a[0]:= 0;
count:= 0:
for x from 1 to 30 do
L:= convert(x, base, 10);
for i from 1 to nops(L) do
count:= count+1;
a[count]:= a[count-1]*10+L[-i];
od
od:
seq(a[i], i=1..count); # Robert Israel, Jan 11 2015
MATHEMATICA
b[1] = 1
b[n_] := b[n - 1]*10^(Floor[Log[10, 10n]]) + n
Table[Floor[b[n] /10^(n)], {n, 10, 200}]
Module[{nn=20, ch}, ch=RealDigits[ChampernowneNumber[], 10, nn][[1]]; Table[ FromDigits[ Take[ch, n]], {n, nn}]] (* Harvey P. Dale, Aug 31 2015 *)
PROG
(Python)
from itertools import islice
def bgen(): yield from (c for n in count(1) for c in str(n) )
def agen():
s, g = "", bgen()
while True:
s += next(g); yield int(s)
print(list(islice(agen(), 20))) # Michael S. Branicky, Oct 25 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
José de Jesús Camacho Medina, Dec 15 2014
EXTENSIONS
Definition corrected by Zak Seidov, Jan 18 2015
STATUS
approved