login
A257733
Permutation of natural numbers: a(1) = 1, a(ludic(n)) = lucky(1+a(n-1)), a(nonludic(n)) = unlucky(a(n)), where ludic(n) = n-th ludic number A003309, nonludic(n) = n-th nonludic number A192607 and lucky = A000959, unlucky = A050505.
4
1, 3, 9, 2, 33, 5, 7, 14, 4, 45, 163, 8, 15, 11, 20, 6, 25, 59, 203, 12, 22, 17, 63, 28, 13, 10, 35, 78, 235, 251, 18, 30, 24, 83, 39, 19, 1093, 16, 47, 101, 31, 290, 67, 309, 26, 41, 43, 34, 107, 53, 27, 1283, 87, 23, 61, 128, 42, 354, 88, 376, 21, 36, 55, 57, 46, 137, 115, 70, 38, 1499, 321, 112, 32, 81, 161, 56, 1401, 430, 113, 454, 29, 48, 49
OFFSET
1,2
FORMULA
a(1) = 1; for n > 1: if A192490(n) = 1 [i.e., if n is ludic], then a(n) = A000959(1+a(A192512(n)-1)), otherwise a(n) = A050505(a(A236863(n))).
As a composition of other permutations:
a(n) = A257731(A255422(n)).
a(n) = A257726(A237427(n)).
PROG
(Scheme, with memoization-macro definec)
(definec (A257733 n) (cond ((= 1 n) n) ((= 1 (A192490 n)) (A000959 (+ 1 (A257733 (+ -1 (A192512 n)))))) (else (A050505 (A257733 (A236863 n))))))
;; Alternatively, by composing other permutations:
(define (A257733 n) (A257731 (A255422 n)))
(define (A257733 n) (A257726 (A237427 n)))
CROSSREFS
Inverse: A257734.
Related or similar permutations: A237427, A255422, A257726, A257731.
Cf. also A256486, A256487.
Differs from A257731 for the first time at n=19, where a(19) = 203, while A257731(19) = 63.
Sequence in context: A303941 A176885 A257731 * A098323 A225460 A305274
KEYWORD
nonn,look
AUTHOR
Antti Karttunen, May 06 2015
STATUS
approved