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!)
A257079 The least nonzero digit missing from the factorial representation (A007623) of n. 9
1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 3, 3, 1, 3, 3, 3, 1, 3, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 4, 4, 1, 3, 3, 3, 1, 3, 3, 3, 3, 3, 3, 3, 1, 3, 3, 3, 1, 3, 1, 4, 4, 4, 1, 4, 1, 2, 2, 2, 1, 4, 2, 2, 2, 2, 4, 4, 1, 4, 4, 4, 1, 4, 1, 2, 2, 2, 1, 4, 1, 2, 2, 2, 1, 3, 2, 2, 2, 2, 3, 3, 1, 3, 3, 3, 1, 3, 1, 2, 2, 2, 1, 5, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,2

LINKS

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

Eric Angelini, et al, "Multiply by the fantom digit", Discussion on Seqfan-list

FORMULA

Other identities:

For all n >= 1, a(A033312(n)) = n. [n! - 1 gives the first position where n appears. Note also how the digits in factorial base representation may get arbitrarily large values.]

EXAMPLE

The least digit > 0 missing from the factorial representation (A007623) of zero, "0", is 1, thus a(0) = 1.

The least digit > 0 missing from the factorial representation of one, "1", is 2, thus a(1) = 2.

The least digit > 0 missing from the factorial representation of 21, "311", is 2, thus a(21) = 2.

PROG

(Scheme)

(define (A257079 n) (let loop ((digs (uniq (sort (n->factbase n) <))) (mnp 1)) (cond ((null? digs) mnp) ((zero? (car digs)) (loop (cdr digs) mnp)) ((= (car digs) mnp) (loop (cdr digs) (+ 1 mnp))) (else mnp))))

;; Convert an integer to a factorial expansion list:

(define (n->factbase n) (let loop ((n n) (fex (if (zero? n) (list 0) (list))) (i 2)) (cond ((zero? n) fex) (else (loop (floor->exact (/ n i)) (cons (modulo n i) fex) (1+ i))))))

(define (uniq lista) (let loop ((lista lista) (z (list))) (cond ((null? lista) (reverse! z)) ((and (pair? z) (equal? (car z) (car lista))) (loop (cdr lista) z)) (else (loop (cdr lista) (cons (car lista) z))))))

CROSSREFS

Cf. A007623, A257080.

Cf. A033312 (the positions of records from a(1) onward.)

Cf. A255411 (the positions of ones.)

Sequence in context: A295277 A194290 A329028 * A260372 A037180 A241675

Adjacent sequences:  A257076 A257077 A257078 * A257080 A257081 A257082

KEYWORD

nonn,base

AUTHOR

Antti Karttunen, Apr 15 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 April 9 15:53 EDT 2020. Contains 333361 sequences. (Running on oeis4.)