%I #17 Oct 06 2023 21:23:52
%S 1,2,4,3,6,5,16,8,9,27,14,18,100,11,25,7,210,12,256,20,21,147,38,45,
%T 15,385,10,98,1156,30,1938,50,121,2187,35,125,234256,23,315,245,6902,
%U 72,3496900,120,24,1083,9699690,108,81,32,15625,1458,65536,75,225,231,57,2185,106,243,8836,771147,150,105,143,154,14946,68,529,162
%N Self-inverse permutation of natural numbers, "Blue code" conjugated by A156552 and its inverse: a(n) = A005940(1+A193231(A156552(n))).
%H Antti Karttunen, <a href="/A332450/b332450.txt">Table of n, a(n) for n = 1..4096</a>
%H <a href="/index/Ge#GF2X">Index entries for sequences related to polynomials in ring GF(2)[X]</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%F a(n) = A005940(1+A193231(A156552(n))).
%F a(A003961(n)) = A332451(a(n)); a(A332451(n)) = A003961(a(n)).
%F a(n) = A366263(A156552(n)). - _Antti Karttunen_, Oct 06 2023
%o (PARI)
%o A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); t }; \\ From A005940
%o A156552(n) = {my(f = factor(n), p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res}; \\ From A156552
%o A193231(n) = { my(x='x); subst(lift(Mod(1, 2)*subst(Pol(binary(n), x), x, 1+x)), x, 2) }; \\ From A193231
%o A332450(n) = A005940(1+A193231(A156552(n)));
%Y Cf. A003961, A005940, A156552, A193231, A332449, A332451, A366263.
%Y Cf. A293448 (A057889 similarly conjugated).
%K nonn,look
%O 1,2
%A _Antti Karttunen_, Feb 15 2020
|