login
A273670
Numbers with at least one maximal digit in their factorial base representation.
40
1, 3, 4, 5, 7, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 27, 28, 29, 31, 33, 34, 35, 37, 39, 40, 41, 42, 43, 44, 45, 46, 47, 49, 51, 52, 53, 55, 57, 58, 59, 61, 63, 64, 65, 66, 67, 68, 69, 70, 71, 73, 75, 76, 77, 79, 81, 82, 83, 85, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105
OFFSET
0,2
COMMENTS
Indexing starts from 0 (with a(0) = 1) to tally with the indexing used in A256450.
Numbers n for which is A260736(n) > 0.
Involution A225901 maps each term of this sequence to a unique term of A256450, and vice versa.
FORMULA
a(0) = 1, and for n > 1, if A260736(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:
A273663(a(n)) = n.
MATHEMATICA
r = MixedRadix[Reverse@ Range[2, 12]]; Select[Range@ 105, Total@ Boole@ Map[SameQ @@ # &, Transpose@{#, Range@ Length@ #}] > 0 &@ Reverse@ IntegerDigits[#, r] &] (* Michael De Vlieger, Aug 14 2016, Version 10.2 *)
PROG
(Scheme, with Antti Karttunen's IntSeq-library)
(define A273670 (NONZERO-POS 0 0 A260736))
;; Or as a naive recurrence with memoization-macro definec:
(definec (A273670 n) (if (zero? n) 1 (let ((prev (A273670 (- n 1)))) (cond ((even? prev) (+ 1 prev)) ((not (zero? (A260736 (+ 1 prev)))) (+ 1 prev)) (else (+ 2 prev))))))
(Python)
from sympy import factorial as f
def a007623(n, p=2): return n if n<p else a007623(int(n/p), p+1)*10 + n%p
def a257684(n):
x=str(a007623(n))[:-1]
y="".join([str(int(i) - 1) if int(i)>0 else '0' for i in x])[::-1]
return 0 if n==1 else sum([int(y[i])*f(i + 1) for i in range(len(y))])
def a260736(n): return 0 if n==0 else n%2 + a260736(a257684(n))
print([n for n in range(106) if a260736(n)>0]) # Indranil Ghosh, Jun 20 2017
CROSSREFS
Cf. A153880 (complement).
Cf. A273663 (a left inverse).
Cf. A260736.
Cf. also A225901, A256450.
Sequence in context: A285343 A335002 A276155 * A153329 A213637 A047251
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, May 29 2016
STATUS
approved