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”).

A245605
Permutation of natural numbers: a(1) = 1, a(2n) = 2 * a(A064989(2n-1)), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).
15
1, 2, 3, 4, 5, 6, 9, 10, 7, 8, 13, 18, 17, 26, 11, 12, 37, 34, 25, 74, 15, 16, 69, 50, 21, 14, 19, 20, 33, 138, 41, 66, 35, 52, 53, 22, 277, 82, 31, 32, 45, 554, 65, 90, 27, 36, 1109, 130, 101, 42, 43, 28, 73, 2218, 149, 30, 71, 104, 57, 146, 209, 114, 51, 148, 133, 70, 293, 418, 555, 164, 141, 586, 329, 282, 75, 68, 105, 106, 1173, 658, 23, 24
OFFSET
1,2
COMMENTS
The even bisection halved gives A245607. The odd bisection incremented by one and halved gives A245707.
FORMULA
a(1) = 1, a(2n) = 2 * a(A064989(2n-1)), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).
a(1) = 1, a(2n) = 2 * a(A064216(n)), a(2n-1) = 1 + (2 * a(A064216(n)-1)).
As a composition of related permutations:
a(n) = A245607(A048673(n)).
PROG
(PARI)
A064989(n) = my(f = factor(n)); for(i=1, #f~, if((2 == f[i, 1]), f[i, 1] = 1, f[i, 1] = precprime(f[i, 1]-1))); factorback(f);
A245605(n) = if(1==n, 1, if(0==(n%2), 2*A245605(A064989(n-1)), 1+(2*A245605(A064989(n)-1))));
for(n=1, 10001, write("b245605.txt", n, " ", A245605(n)));
(Scheme, with memoization-macro definec)
(definec (A245605 n) (cond ((= 1 n) 1) ((even? n) (* 2 (A245605 (A064989 (- n 1))))) (else (+ 1 (* 2 (A245605 (-1+ (A064989 n))))))))
CROSSREFS
Inverse: A245606.
Similar entanglement permutations: A244319, A005940, A163511, A243287, A243343, A243345, A244321, A245603, A245613, A135141, A237427.
Sequence in context: A240827 A023841 A340553 * A269863 A297165 A245606
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 29 2014
STATUS
approved