login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A270199
Self-inverse permutation of natural numbers: a(1) = 1, a(A269389(1+n)) = A269399(a(n)), a(A269399(n)) = A269389(1+a(n)).
7
1, 3, 2, 9, 6, 5, 30, 15, 4, 16, 12, 11, 93, 45, 8, 10, 46, 48, 34, 33, 266, 124, 26, 31, 127, 23, 154, 99, 97, 7, 24, 727, 20, 19, 352, 80, 94, 357, 68, 141, 69, 446, 278, 272, 14, 17, 70, 18, 71, 73, 1902, 54, 61, 52, 946, 232, 267, 957, 197, 408, 53, 199, 1174, 763, 407, 751, 186, 39, 41, 47, 49, 202, 50, 204, 210, 4724, 164, 192, 182, 36
OFFSET
1,2
FORMULA
a(1) = 1, for n > 1, if A137264(6+n) = 0 [when n is in A269399], a(n) = A269389(1+a(n-A269362(n))), otherwise a(n) = A269399(a(A269362(n)-1)).
PROG
(Scheme, with memoization-macro definec)
(definec (A270199 n) (cond ((= 1 n) n) ((not (zero? (A137264 (+ 6 n)))) (A269399 (A270199 (+ -1 (A269362 n))))) (else (A269389 (+ 1 (A270199 (- n (A269362 n))))))))
CROSSREFS
Related or similar permutations: A267107, A270193, A270194.
Sequence in context: A269867 A244319 A269359 * A349579 A374968 A082819
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 16 2016
STATUS
approved