login
A245707
Permutation of natural numbers, the odd bisection of A245605 incremented by one and halved: a(n) = (1+A245605((2*n)-1))/2.
6
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, 22, 37, 75, 36, 29, 105, 26, 67, 147, 278, 71, 165, 38, 53, 587, 12, 107, 83, 28, 25, 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
OFFSET
1,2
FORMULA
a(n) = (1+A245605((2*n)-1))/2.
As a composition of related permutations:
a(1) = 1, and for n > 1, a(n) = 1+A245605(A064216(n)-1).
a(n) = A245706(A245607(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))));
A245707(n) = (1+A245605((2*n)-1))/2;
for(n=1, 10001, write("b245707.txt", n, " ", A245707(n)));
(Scheme, two alternative implementations)
(define (A245707 n) (* (/ 1 2) (+ 1 (A245605 (-1+ (* 2 n))))))
(define (A245707 n) (if (= 1 n) n (+ 1 (A245605 (-1+ (A064216 n))))))
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Jul 30 2014
STATUS
approved