[go: up one dir, main page]

login
A266638
a(1) = 1, a(ludic(n)) = (ludic(3+a(n-1))-1)/2, a(nonludic(n)) = A266410(a(n)), where ludic(n) = n-th ludic number A003309, nonludic(n) = n-th nonludic number A192607 and A266410 = numbers n such that 2n+1 is nonludic.
5
1, 2, 3, 4, 5, 7, 6, 9, 10, 13, 8, 16, 12, 15, 19, 22, 11, 27, 17, 31, 25, 29, 18, 36, 20, 40, 24, 49, 26, 32, 54, 46, 51, 34, 62, 37, 14, 68, 43, 81, 35, 47, 23, 55, 88, 76, 33, 83, 58, 99, 64, 28, 44, 107, 72, 127, 61, 77, 42, 91, 53, 136, 121, 56, 130, 94, 21, 151, 101, 50, 65, 73, 161, 114, 189, 98, 38
OFFSET
1,2
FORMULA
a(1) = 1; for n > 1, if A192490(n) = 1 [when n is one of Ludic numbers, A003309] a(n) = A266409(1+a(A192512(n)-1)), otherwise a(n) = A266410(a(A236863(n))).
As a composition of related permutations:
a(n) = A266418(A237427(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A266638 n) (cond ((<= n 1) n) ((= 1 (A192490 n)) (A266409 (+ 1 (A266638 (- (A192512 n) 1))))) (else (A266410 (A266638 (A236863 n))))))
CROSSREFS
Inverse: A266637.
Related or similar permutations: A237427, A266418.
Sequence in context: A023826 A283192 A369282 * A256231 A288870 A283194
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jan 28 2016
STATUS
approved