cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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)).

This page as a plain text file.
%I A230403 #32 Mar 10 2021 03:19:16
%S A230403 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,
%T A230403 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,
%U A230403 0,1,0,3,0,1,0,1,0,2,0,1,0,1,0,2,0,1
%N 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)).
%C A230403 Many of the comments given in A055881 apply also here.
%C A230403 From _Amiram Eldar_, Mar 10 2021: (Start)
%C A230403 The asymptotic density of the occurrences of k is (k+1)/(k+2)!.
%C A230403 The asymptotic mean of this sequence is e - 2 = 0.718281... (A001113 - 2). (End)
%H A230403 Antti Karttunen, <a href="/A230403/b230403.txt">Table of n, a(n) for n = 1..10080</a>
%H A230403 Tyler Ball, Joanne Beckford, Paul Dalenberg, Tom Edgar, and Tina Rajabi, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Edgar/edgar3.html">Some Combinatorics of Factorial Base Representations</a>, J. Int. Seq., Vol. 23 (2020), Article 20.3.3.
%H A230403 <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>
%F A230403 a(n) = A055881(n)-1.
%e A230403 In factorial number base representation (A007623), the numbers from 1 to 9 are represented as:
%e A230403 n  A007623(n)  a(n) (gives the number of trailing zeros)
%e A230403 1        1       0
%e A230403 2       10       1
%e A230403 3       11       0
%e A230403 4       20       1
%e A230403 5       21       0
%e A230403 6      100       2
%e A230403 7      101       0
%e A230403 8      110       1
%e A230403 9      111       0
%t A230403 With[{b = MixedRadix[Range[12, 2, -1]]}, Array[LengthWhile[Reverse@ IntegerDigits[#, b], # == 0 &] &, 105]] (* _Michael De Vlieger_, Jun 03 2020 *)
%o A230403 (Scheme)
%o A230403 (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)))))))
%Y A230403 Cf. A001113, A055881. Bisection: A230404.
%Y A230403 A few sequences related to factorial base representation (A007623): A034968, A084558, A099563, A060130, A227130, A227132, A227148, A227149, A153880.
%Y A230403 Analogous sequence for binary system: A007814.
%K A230403 nonn,base,easy
%O A230403 1,6
%A A230403 _Antti Karttunen_, Oct 31 2013