%I #9 Sep 27 2023 02:45:04
%S 0,1,3,6,12,2,24,7,48,13,96,5,192,25,15,384,768,49,1536,10,27,97,3072,
%T 4,6144,193,51,30,12288,14,24576,385,99,769,20,54,49152,1537,195,11,
%U 98304,26,196608,102,60,3073,393216,387,786432,6145,771,198,1572864,50,108,31,1539,12289,3145728,9,6291456,24577,40,390,204,98,12582912,774,3075,21
%N Inverse permutation to A302783: a(n) = A003188(A052331(n)).
%H Antti Karttunen, <a href="/A302784/b302784.txt">Table of n, a(n) for n = 1..4096</a>
%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F a(n) = A003188(A052331(n)).
%o (PARI)
%o up_to = 4096;
%o v050376 = vector(up_to);
%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 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 A003188(n) = bitxor(n, n>>1);
%o A302784(n) = A003188(A052331(n));
%Y Cf. A302783 (inverse).
%Y Cf. also A302029.
%K nonn
%O 1,3
%A _Antti Karttunen_, Apr 16 2018