This site is supported by donations to The OEIS Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A257510 Number of nonleading zeros in factorial base representation of n (A007623). 7
 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 3, 2, 2, 1, 2, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 3, 2, 2, 1, 2, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 3, 2, 2, 1, 2, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 3, 2, 2, 1, 2, 1, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 4 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,6 COMMENTS Sequence starts from n=1, because 0 is an ambiguous case. LINKS Antti Karttunen, Table of n, a(n) for n = 1..10080 FORMULA a(n) = A084558(n) - A060130(n). Other identities and observations: For all n >= 0, a(A000142(n+1)) = n. [(n+1)! gives the position where n first appears.] For all n, a(n) >= A230403(n). MATHEMATICA factBaseIntDs[n_] := Module[{m, i, len, dList, currDigit}, i = 1; While[n > i!, i++]; m = n; len = i; dList = Table[0, {len}]; Do[currDigit = 0; While[m >= j!, m = m - j!; currDigit++]; dList[[len - j + 1]] = currDigit, {j, i, 1, -1}]; If[dList[[1]] == 0, dList = Drop[dList, 1]]; dList]; s = Table[FromDigits[factBaseIntDs[n]], {n, 120}]; Last@ DigitCount[#] & /@ s (* Michael De Vlieger, Apr 27 2015, after Alonso del Arte at A007623 *) PROG (Scheme) (define (A257510 n) (let loop ((n n) (i 2) (s 0)) (cond ((zero? n) s) (else (loop (floor->exact (/ n i)) (+ 1 i) (+ s (if (zero? (modulo n i)) 1 0))))))) CROSSREFS Cf. A227157 (numbers n such that a(n) = 0), A227187 (n for which a(n) > 0). Cf. A007623, A060130, A084558, A230403. Cf. also A257511. Cf. also A023416, A080791 (analogous sequences for base-2), A055641 (for base-10). Sequence in context: A276007 A078659 A079690 * A305445 A225721 A040076 Adjacent sequences:  A257507 A257508 A257509 * A257511 A257512 A257513 KEYWORD nonn,base AUTHOR Antti Karttunen, Apr 27 2015 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 | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified November 16 12:40 EST 2018. Contains 317272 sequences. (Running on oeis4.)