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!)
A266123 Decrement by 1 all digits > 1 in factorial base representation of n and then shift it one digit right. 3
0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 3, 3, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 6, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 13, 13, 14, 14, 15, 15, 15, 15, 14, 14, 15, 15, 15, 15, 16, 16, 17, 17, 17, 17, 18 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,7
LINKS
EXAMPLE
n A007623(n) [subtract 1 from digits > 1 a(n)
[in factorial then shift one digit right] [reinterpret
base] in decimal]
0 0 -> 0 = 0
1 1 -> 0 = 0
2 10 -> 1 = 1
3 11 -> 1 = 1
4 20 -> 1 = 1
5 21 -> 1 = 1
6 100 -> 10 = 2
7 101 -> 10 = 2
8 110 -> 11 = 3
9 111 -> 11 = 3
10 120 -> 11 = 3
11 121 -> 11 = 3
12 200 -> 10 = 2
13 201 -> 10 = 2
14 210 -> 11 = 3
15 211 -> 11 = 3
16 220 -> 11 = 3
17 221 -> 11 = 3
18 300 -> 20 = 4
PROG
(MIT/GNU Scheme)
(define (A266123 n) (let loop ((n n) (z 0) (i 2) (f 0)) (cond ((zero? n) z) (else (let ((d (remainder n i))) (loop (quotient n i) (+ z (* f (- d (if (<= d 1) 0 1)))) (+ 1 i) (if (zero? f) 1 (* f (- i 1)))))))))
CROSSREFS
Sequence in context: A321859 A321860 A348459 * A115230 A363937 A338686
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Dec 23 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 September 17 16:38 EDT 2024. Contains 375990 sequences. (Running on oeis4.)