A230403 a(n) = the largest k such that (k+1)! divides n; the number of trailing zeros in the factorial base representation of n (A007623(n)).
0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 0, 1, 0, 1, 0, 2, 0, 1
Offset: 1
Examples
In factorial number base representation (A007623), the numbers from 1 to 9 are represented as: n A007623(n) a(n) (gives the number of trailing zeros) 1 1 0 2 10 1 3 11 0 4 20 1 5 21 0 6 100 2 7 101 0 8 110 1 9 111 0
Links
- Antti Karttunen, Table of n, a(n) for n = 1..10080
- Tyler Ball, Joanne Beckford, Paul Dalenberg, Tom Edgar, and Tina Rajabi, Some Combinatorics of Factorial Base Representations, J. Int. Seq., Vol. 23 (2020), Article 20.3.3.
- Index entries for sequences related to factorial base representation
Crossrefs
Programs
-
Mathematica
With[{b = MixedRadix[Range[12, 2, -1]]}, Array[LengthWhile[Reverse@ IntegerDigits[#, b], # == 0 &] &, 105]] (* Michael De Vlieger, Jun 03 2020 *)
-
Scheme
(define (A230403 n) (if (zero? n) 0 (let loop ((n n) (i 2)) (cond ((not (zero? (modulo n i))) (- i 2)) (else (loop (/ n i) (1+ i)))))))
Formula
a(n) = A055881(n)-1.
Comments