login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A257260 One-based position of the rightmost zero in the factorial base representation of n (A007623), 0 if no nonleading zeros present. 3
0, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 3, 1, 3, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 3, 1, 3, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 3, 1, 3, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 3, 1, 3, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1, 2, 1, 0, 1, 0, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,7

COMMENTS

a(n) gives the distance of the rightmost zero from the right hand end of factorial base representation of n (A007623), particularly, 1 when n is even, and 0 for those cases when there are no nonleading zeros present (terms of A227157).

Sequence starts from n=1, to avoid ambiguities with case zero.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10080

Index entries for sequences related to factorial base representation

EXAMPLE

For n = 1, with factorial base representation (A007623) "1", there are no nonleading zeros at all, thus a(1) = 0.

For n = 6, with representation "100", the rightmost zero occurs at digit-position 1 (when the least significant digit has index 1, etc.), thus a(6) = 1.

For n = 7, with representation "101", the rightmost zero occurs at position 2, thus a(7) = 2.

PROG

(Scheme) (define (A257260 n) (let loop ((n n) (i 2)) (cond ((zero? n) 0) ((zero? (modulo n i)) (- i 1)) (else (loop (floor->exact (/ n i)) (+ 1 i))))))

CROSSREFS

Cf. A227157 (positions of zeros), A000012 (even bisection).

Cf. also A257261, A230403, and arrays of permutations A060117 & A060118.

Sequence in context: A141095 A175599 A179759 * A334208 A159195 A265859

Adjacent sequences:  A257257 A257258 A257259 * A257261 A257262 A257263

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Apr 29 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
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 16 14:39 EDT 2021. Contains 343949 sequences. (Running on oeis4.)