The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A256450 Numbers that have at least one 1-digit in their factorial base representation (A007623). 36
1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 65, 67, 68, 69, 71, 73, 74, 75, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 89, 91, 92, 93, 95, 97, 98, 99, 101 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Numbers n for which A257679(n) = 1, i.e., numbers n such that the least nonzero digit in their factorial base representation (A007623) is 1.
Involution A225901 maps each term of this sequence to a unique term of A273670, and vice versa.
Starting offset is zero (with a(0) = 1) because it is the most natural offset for the given fast recurrence.
LINKS
FORMULA
a(0) = 1, and for n >= 1, if A257511(1+a(n-1)) > 0, then a(n) = a(n-1) + 1, otherwise a(n-1) + 2. [In particular, if the previous term is 2k, then the next term is 2k+1, because all odd numbers are members.]
Other identities:
For all n >= 0, A273662(a(n)) = n. [A273662 works as the left inverse for this sequence.]
From Antti Karttunen, May 26 2015: (Start)
Alternative recurrence for the same sequence:
Set k = A258198(n), d = n - A258199(n) and f = A000142(k+1) = (k+1)! If d < f then b(n) = f+d, otherwise b(n) = ((2+floor((d-f)/A258199(n))) * f) + b((d-f) mod A258199(n)). For offset=1 sequence, define a(n) = b(n-1).
(End)
MATHEMATICA
Select[Range@ 101, MemberQ[IntegerDigits[#, MixedRadix[Reverse@ Range@ 12]], 1] &] (* Michael De Vlieger, May 30 2016, Version 10.2 *)
r = MixedRadix[Reverse@ Range[2, 12]]; Select[Range@ 101, Min[IntegerDigits[#, r] /. 0 -> Nothing] == 1 &] (* Michael De Vlieger, Aug 14 2016, Version 10.2 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(define A256450 (NONZERO-POS 0 0 A257680))
;; Alternatively, as a naive recurrence:
(definec (A256450 n) (if (zero? n) 1 (let ((prev (A256450 (- n 1)))) (cond ((even? prev) (+ 1 prev)) ((> (A257511 (+ 1 prev)) 0) (+ 1 prev)) (else (+ 2 prev))))))
;; Faster recurrence May 26 2015:
(definec (A256450 n) (let* ((k (A258198 n)) (d (- n (A258199 n))) (f (A000142 (+ 1 k)))) (cond ((< d f) (+ f d)) (else (+ (* f (+ 2 (floor->exact (/ (- d f) (A258199 n))))) (A256450 (modulo (- d f) (A258199 n))))))))
(Python)
def A(n, p=2): return n if n<p else A(n//p, p+1)*10 + n%p
print([n for n in range(1, 151) if str(A(n)).count("1")>=1]) # Indranil Ghosh, Jun 19 2017
CROSSREFS
Complement of A255411.
Cf. A257680 (characteristic function), A273662 (left inverse).
First row of A257503, first column of A257505.
Subsequences: A059590 (apart from its zero-term), A255341, A255342, A255343, A257262, A257263, A258198, A258199.
Cf. also A227187 (numbers with at least one nonleading zero) and A273670, A225901.
Sequence in context: A039213 A359794 A326947 * A119605 A144146 A284763
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Apr 27 2015
EXTENSIONS
Starting offset changed from 1 to 0 by Antti Karttunen, May 30 2016
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 May 15 02:15 EDT 2024. Contains 372536 sequences. (Running on oeis4.)