%I #7 Jul 31 2014 23:51:01
%S 1,2,3,5,4,7,9,6,19,13,8,35,11,10,17,21,18,27,139,16,23,33,14,555,51,
%T 22,37,75,36,29,105,26,67,147,278,71,165,38,53,587,12,107,83,28,25,
%U 2219,72,43,73,20,87,41,34,291,277,210,163,31,66,149,131,330,15,229,24,39,2347,70,49,101
%N Permutation of natural numbers, the odd bisection of A245605 incremented by one and halved: a(n) = (1+A245605((2*n)-1))/2.
%H Antti Karttunen, <a href="/A245707/b245707.txt">Table of n, a(n) for n = 1..10001</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(n) = (1+A245605((2*n)-1))/2.
%F As a composition of related permutations:
%F a(1) = 1, and for n > 1, a(n) = 1+A245605(A064216(n)-1).
%F a(n) = A245706(A245607(n)).
%o (PARI)
%o 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);
%o A245605(n) = if(1==n, 1, if(0==(n%2), 2*A245605(A064989(n-1)), 1+(2*A245605(A064989(n)-1))));
%o A245707(n) = (1+A245605((2*n)-1))/2;
%o for(n=1, 10001, write("b245707.txt", n, " ", A245707(n)));
%o (Scheme, two alternative implementations)
%o (define (A245707 n) (* (/ 1 2) (+ 1 (A245605 (-1+ (* 2 n))))))
%o (define (A245707 n) (if (= 1 n) n (+ 1 (A245605 (-1+ (A064216 n))))))
%Y Inverse: A245708.
%Y Cf. A064216, A064989, A245605, A245607, A245706.
%K nonn
%O 1,2
%A _Antti Karttunen_, Jul 30 2014
|