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!)
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

%I #30 Jan 02 2023 12:30:51

%S 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,

%T 23,29,42,28,25,48,34,53,41,54,27,40,33,36,37,61,65,44,49,72,39,38,51,

%U 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

%N 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).

%C 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.

%H Antti Karttunen, <a href="/A266117/b266117.txt">Table of n, a(n) for n = 1..14641</a>

%H Eric Angelini, <a href="http://list.seqfan.eu/oldermail/seqfan/2015-December/015890.html">a(n)*a(n+1) shows at least twice the same digit</a>, Posting on SeqFan-list Dec 21 2015. [Source of inspiration for this sequence.]

%H <a href="/index/Fa#facbase">Index entries for sequences related to factorial base representation</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e 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.

%e 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.

%e 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.

%e But 5*10 = 50, which has a factorial base representation ("2010") that matches the criterion, thus a(6) = 10.

%o (Scheme, with defineperm1-macro from _Antti Karttunen_'s IntSeq-library)

%o ;; Reference-implementation, quite sub-optimal:

%o (defineperm1 (A266117 n) (if (= 1 n) n (let ((prev (A266117 (- n 1)))) (let loop ((k 1)) (cond ((and (not-lte? (A266118 k) (- n 1)) (= (A264990 (* k prev)) 1)) k) (else (loop (+ 1 k))))))))

%o ;; We consider a > b (i.e. not less than b) also in case a is #f.

%o ;; (Because of the stateful caching system used by defineperm1-macro):

%o (define (not-lte? a b) (cond ((not (number? a)) #t) (else (> a b))))

%Y Left inverse: A266118 (also the right inverse if this sequence is a permutation of the positive integers).

%Y Cf. A264990, A265349.

%Y Cf. also A266121, A266191 and A266195 for similar permutations.

%K nonn,base

%O 1,2

%A _Antti Karttunen_, Dec 22 2015

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 April 18 06:24 EDT 2024. Contains 371769 sequences. (Running on oeis4.)