Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A245606
Permutation of natural numbers: a(1) = 1, a(2n) = 1 + A003961(a(n)), a(2n+1) = A003961(1+a(n)). [Where A003961(n) shifts the prime factorization of n one step left].
14
1, 2, 3, 4, 5, 6, 9, 10, 7, 8, 15, 16, 11, 26, 21, 22, 13, 12, 27, 28, 25, 36, 81, 82, 19, 14, 45, 52, 125, 56, 39, 40, 29, 18, 33, 46, 17, 126, 99, 100, 31, 50, 51, 226, 41, 626, 129, 130, 89, 24, 63, 34, 35, 176, 87, 154, 59, 344, 825, 298, 115, 86, 189, 190, 43, 32, 105, 76, 23, 66, 57, 88, 53, 20
OFFSET
1,2
COMMENTS
The even bisection halved gives A245608. The odd bisection incremented by one and halved gives A245708.
FORMULA
a(1) = 1, a(2n) = A243501(a(n)), a(2n+1) = A003961(1+a(n)).
As a composition of related permutations:
a(n) = A064216(A245608(n)).
PROG
(PARI)
A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ This function from Michel Marcus
A245606(n) = if(1==n, 1, if(0==(n%2), 1+A003961(A245606(n/2)), A003961(1+A245606((n-1)/2))))
for(n=1, 10001, write("b245606.txt", n, " ", A245606(n)))
(Scheme, with memoization-macro definec)
(definec (A245606 n) (cond ((= 1 n) 1) ((even? n) (A243501 (A245606 (/ n 2)))) (else (A003961 (+ 1 (A245606 (/ (- n 1) 2)))))))
CROSSREFS
Inverse: A245605.
Similar entanglement permutations: A244319, A156552, A243071, A243288, A243344, A243346, A244322, A245604, A245614, A227413, A237126.
Sequence in context: A245605 A269863 A297165 * A269864 A103681 A367696
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 29 2014
STATUS
approved