This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2017 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A108731 Triangle read by rows: row n gives digits of n in factorial base. 12
 0, 1, 1, 0, 1, 1, 2, 0, 2, 1, 1, 0, 0, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 2, 0, 1, 2, 1, 2, 0, 0, 2, 0, 1, 2, 1, 0, 2, 1, 1, 2, 2, 0, 2, 2, 1, 3, 0, 0, 3, 0, 1, 3, 1, 0, 3, 1, 1, 3, 2, 0, 3, 2, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 1, 0, 2, 0, 1, 0, 2, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,7 COMMENTS Row lengths are A084558. This sequence contains every finite sequence of nonnegative integers. T(n,k)=A235168(n,k) for k=0..23; a(n) = A235168(n) for n=0..63, when both tables are seen as flattened lists. - Reinhard Zumkeller, Jan 05 2014 LINKS Reinhard Zumkeller, Rows n = 0..2000 of triangle, flattened C. A. Laisant, Sur la numération factorielle, application aux permutations, Bulletin de la Société Mathématique de France, 16 (1888), p. 176-183. Wikipedia, Factorial number system EXAMPLE Triangle begins:   0   1   1, 0   1, 1   2, 0   2, 1   1, 0, 0 For example, 11 in factorial base is 121 (1*6 + 2*2 + 1*1), so row 11 is 1,2,1. MAPLE b:= proc(n, i) local r; `if`(n b(n, 2)[]: seq(T(n), n=0..50);  # Alois P. Heinz, Mar 19 2014 MATHEMATICA b[n_, i_] := b[n, i] = Module[{q, r}, If[n < i, {n}, {q, r} = QuotientRemainder[n, i]; Append[b[q, i + 1], r]]]; T[n_] := b[n, 2]; Table[T[n], {n, 0, 40}] // Flatten (* Jean-François Alcover, Feb 03 2018, after Alois P. Heinz *) PROG (Haskell) a108731 n k = a108731_row n !! k a108731_row 0 = [0] a108731_row n = t n \$ reverse \$ takeWhile (<= n) \$ tail a000142_list    where t 0 []     = []          t x (b:bs) = x' : t m bs where (x', m) = divMod x b a108731_tabf = map a108731_row [0..] -- Reinhard Zumkeller, Jun 04 2012 (PARI) A108731_row(n)={n=[n]; while(n[1], n=concat(divrem(n[1], 1+#n), n[^1]); n[1]||break); n[^1]~} \\ M. F. Hasler, Jun 20 2017 CROSSREFS Cf: A000142, A007623, A084558, A301872. Sequence in context: A321428 A076626 A182886 * A235168 A060950 A039976 Adjacent sequences:  A108728 A108729 A108730 * A108732 A108733 A108734 KEYWORD easy,nonn,tabf,base AUTHOR Franklin T. Adams-Watters, Jun 22 2005 EXTENSIONS Added a(0)=0 and offset changed accordingly by Reinhard Zumkeller, Jun 04 2012 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 9 20:24 EST 2018. Contains 318023 sequences. (Running on oeis4.)