login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257510 Number of nonleading zeros in factorial base representation of n (A007623). 8
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
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. also A257511.
Cf. also A023416, A080791 (analogous sequences for base-2), A055641 (for base-10).
Sequence in context: A078659 A079690 A328620 * A305445 A225721 A040076
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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 19:39 EDT 2024. Contains 371963 sequences. (Running on oeis4.)