OFFSET
1,1
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
MAPLE
f:=k->(10^k-1)/9; for n from 3 to 12 do for i from n-2 by -1 to 1 do j:=f(n)-10^i; lprint(j); od; od;
PROG
(Haskell)
a190619 n = a190619_list !! (n-1)
a190619_list = map read $ f 2 1 :: [Integer] where
f m k
| k < m - 1 = ((take k ones) ++ "0" ++ (take (m-k) ones)) : f m (k+1)
| otherwise = ((take k ones) ++ "01") : f (m + 1) 1
ones = repeat '1'
-- Reinhard Zumkeller, May 15 2011
(Python)
from itertools import count, islice
def agen():
for d in count(3):
b = (10**d - 1)//9
for i in range(2, d):
yield b - 10**(d-i)
print(list(islice(agen(), 50))) # Michael S. Branicky, Oct 13 2022
CROSSREFS
KEYWORD
nonn,base
AUTHOR
N. J. A. Sloane, May 14 2011
STATUS
approved