%I #16 Jun 10 2018 18:02:20
%S 1,2,3,6,4,8,5,24,12,10,7,30,9,14,15,120,11,40,13,42,21,18,16,168,20,
%T 22,60,54,17,56,19,840,27,26,28,210,23,32,33,216,25,72,29,66,84,34,31,
%U 1080,35,70,39,78,37,280,36,264,48,38,41,270,43,46,108,7560,44,88,47,96,51,90,49,1512,53,50,105,102,45,104,59,1320
%N Permutation of natural numbers mapping ordinary factorization to "Fermi-Dirac factorization": a(1) = 1, a(2n) = 2*A300841(a(n)), a(A003961(n)) = A300841(a(n)).
%C See comments and additional formulas in A302024.
%H Antti Karttunen, <a href="/A302023/b302023.txt">Table of n, a(n) for n = 1..10000</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(1) = 1; a(2n) = 2*A300841(a(n)), a(2n+1) = A300841(a(A064989(2n+1))). [corrected Jun 10 2018]
%F a(n) = A052330(A156552(n)).
%F a(A000040(n)) = A050376(n).
%o (PARI)
%o up_to = 32768;
%o v050376 = vector(up_to);
%o A050376(n) = v050376[n];
%o ispow2(n) = (n && !bitand(n,n-1));
%o i = 0; for(n=1,oo,if(ispow2(isprimepower(n)), i++; v050376[i] = n); if(i == up_to,break));
%o A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); };
%o A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); };
%o A300841(n) = A052330(2*A052331(n));
%o A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
%o A302023(n) = if(1==n,n,if(!(n%2),2*A300841(A302023(n/2)),A300841(A302023(A064989(n)))));
%Y Cf. A302024 (inverse).
%Y Cf. A050376, A052330, A064989, A156552, A300841.
%Y Cf. also A091202, A302025.
%K nonn
%O 1,2
%A _Antti Karttunen_, Apr 15 2018