This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A257679 The smallest nonzero digit present in the factorial base representation (A007623) of n, 0 if no nonzero digits present. 16
 0, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,5 COMMENTS a(0) = 0 by convention, because "0" has no nonzero digits present. a(n) gives the row index of n in array A257503 (equally, the column index for array A257505). LINKS Antti Karttunen, Table of n, a(n) for n = 0..5040 FORMULA If A257687(n) = 0, then a(n) = A099563(n), otherwise a(n) = min(A099563(n), a(A257687(n))). In other words, if n is either zero or one of the terms of A051683, then a(n) = A099563(n) [the most significant digit of its f.b.r.], otherwise take the minimum of the most significant digit and a(A257687(n)) [value computed by recursing with a smaller value obtained by discarding that most significant digit]. a(0) = 0, and for n >= 1: if A257680(n) = 1, then a(n) = 1, otherwise 1 + a(A257684(n)). Other identities: For all n >= 0, a(A001563(n)) = n. [n * n! gives the first position where n appears. Note also that the "digits" (placeholders) in factorial base representation may get arbitrarily large values.] For all n >= 0, a(2n+1) = 1 [because all odd numbers end with digit 1 in factorial base]. EXAMPLE Factorial base representation (A007623) of 4 is "20", the smallest digit which is not zero is "2", thus a(4) = 2. PROG (Scheme) (define (A257679 n) (let loop ((n n) (i 2) (mind 0)) (if (zero? n) mind (let ((d (modulo n i))) (loop (/ (- n d) i) (+ 1 i) (cond ((zero? mind) d) ((zero? d) mind) (else (min d mind)))))))) ;; Alternative implementations based on given recurrences, using memoizing definec-macro: (definec (A257679 n) (if (zero? (A257687 n)) (A099563 n) (min (A099563 n) (A257679 (A257687 n))))) (definec (A257679 n) (cond ((zero? n) n) ((= 1 (A257680 n)) 1) (else (+ 1 (A257679 (A257684 n)))))) (Python) def A(n, p=2): return n if n

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

Last modified November 15 22:20 EST 2018. Contains 317252 sequences. (Running on oeis4.)