

A266117


Lexicographically first injection of positive integers beginning with a(1) such that a(n)*a(n+1) is a term of A265349, i.e., has no multiple occurrences of any nonzero digit when viewed in factorial base (A007623).


6



1, 2, 3, 4, 5, 10, 11, 6, 7, 12, 8, 9, 24, 13, 18, 19, 26, 14, 17, 22, 21, 16, 15, 32, 30, 20, 23, 29, 42, 28, 25, 48, 34, 53, 41, 54, 27, 40, 33, 36, 37, 61, 65, 44, 49, 72, 39, 38, 51, 52, 55, 59, 47, 46, 58, 50, 60, 62, 31, 66, 56, 57, 64, 45, 80, 63, 74, 69, 68, 35, 79, 100, 73, 43, 67, 70, 71, 78, 84, 87, 92, 90, 76, 96, 75
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

1,2


COMMENTS

After a(1) = 1, always choose for a(n+1) the least unused k such that in factorial base representation (A007623), the product a(n)*a(n+1) will not show any of the nonzero digits present twice (or more times), regardless of the positions of the digits.


LINKS

Antti Karttunen, Table of n, a(n) for n = 1..14641
Eric Angelini, a(n)*a(n+1) shows at least twice the same digit, Posting on SeqFanlist Dec 21 2015. [Source of inspiration for this sequence.]
Index entries for sequences related to factorial base representation
Index entries for sequences that are permutations of the natural numbers


EXAMPLE

For n = 6, we start searching from the least not yet used number in range a(1) .. a(5) [which is 6, because all the previous terms are fixed] for the first number whose product with a(5) = 5 results a number in A265349.
Multiplying 5 (in factorial base "21") with 6 (in factorial base "100") results 30, which in factorial base is "1100", containing digit "1" twice, thus 6 is disqualified.
Similarly, products 5*7, 5*8 and 5*9 result 35 = "1121", 40 = "1220" and 45 = "1311", where in all cases one of the nonzero digits occur more than once, so 7, 8 and 9 are also all disqualified.
But 5*10 = 50, which has a factorial base representation ("2010") that matches the criterion, thus a(6) = 10.


PROG

(Scheme, with defineperm1macro from Antti Karttunen's IntSeqlibrary)
;; Referenceimplementation, quite suboptimal:
(defineperm1 (A266117 n) (if (= 1 n) n (let ((prev (A266117 ( n 1)))) (let loop ((k 1)) (cond ((and (notlte? (A266118 k) ( n 1)) (= (A264990 (* k prev)) 1)) k) (else (loop (+ 1 k))))))))
;; We consider a > b (i.e. not less than b) also in case a is #f.
;; (Because of the stateful caching system used by defineperm1macro):
(define (notlte? a b) (cond ((not (number? a)) #t) (else (> a b))))


CROSSREFS

Left inverse: A266118 (also the right inverse if this sequence is a permutation of the positive integers).
Cf. A264990, A265349.
Cf. also A266121, A266191 and A266195 for similar permutations.
Sequence in context: A338749 A072701 A261039 * A037473 A007092 A241213
Adjacent sequences: A266114 A266115 A266116 * A266118 A266119 A266120


KEYWORD

nonn,base


AUTHOR

Antti Karttunen, Dec 22 2015


STATUS

approved



