|
|
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.]
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
|
;; 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:
(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
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|