login
Self-inverse permutation of natural numbers: a(1) = 1; thereafter, if n is k-th number with an odd number of prime divisors (counted with multiplicity) [i.e., n = A026424(k)], a(n) = A028260(1+a(k)), otherwise, when n is k-th number > 1 with an even number of prime divisors [i.e., n = A028260(1+k)], a(n) = A026424(a(k)).
6

%I #17 Jan 14 2015 16:13:33

%S 1,4,10,2,24,7,6,55,18,3,16,15,121,44,12,11,39,9,36,35,105,31,250,5,

%T 29,28,93,26,25,86,22,82,238,79,20,19,81,72,17,68,218,65,517,14,62,67,

%U 60,202,195,57,59,56,185,477,8,52,50,175,51,47,177,45,495,167,42,161,46,40,162,169,150,38,143,455,459,140,153,1060,34,134,37,32

%N Self-inverse permutation of natural numbers: a(1) = 1; thereafter, if n is k-th number with an odd number of prime divisors (counted with multiplicity) [i.e., n = A026424(k)], a(n) = A028260(1+a(k)), otherwise, when n is k-th number > 1 with an even number of prime divisors [i.e., n = A028260(1+k)], a(n) = A026424(a(k)).

%H Antti Karttunen, <a href="/A244152/b244152.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(1) = 1, and for n > 1, if A066829(n) = 1, then a(n) = A028260(1 + A244152(A055038(n))), otherwise a(n) = A026424(A244152(A055037(n)-1)).

%F For all n > 1, A008836(a(n)) = -1 * A008836(n), where A008836 is Liouville's lambda-function.

%o (Scheme, with memoization macro definec)

%o (definec (A244152 n) (cond ((= 1 n) 1) ((= 1 (A066829 n)) (A028260 (+ 1 (A244152 (A055038 n))))) (else (A026424 (A244152 (-1+ (A055037 n)))))))

%Y Cf. A008836, A026424, A028260, A055037, A055038, A066829.

%Y Similar entanglement permutations: A245603-A245604, A235491, A236854, A243347, A244319.

%K nonn

%O 1,2

%A _Antti Karttunen_, Jul 27 2014