login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A366276
Permutation of nonnegative integers: a(n) = A057889(A243071(n)).
4
0, 1, 3, 2, 7, 6, 15, 4, 5, 14, 31, 12, 63, 30, 11, 8, 127, 10, 255, 28, 23, 62, 511, 24, 13, 126, 9, 60, 1023, 22, 2047, 16, 47, 254, 27, 20, 4095, 510, 95, 56, 8191, 46, 16383, 124, 19, 1022, 32767, 48, 29, 26, 191, 252, 65535, 18, 55, 120, 383, 2046, 131071, 44, 262143, 4094, 39, 32, 111, 94, 524287, 508, 767, 54
OFFSET
1,3
PROG
(PARI)
A030101(n) = if(n<1, 0, subst(Polrev(binary(n)), x, 2));
A057889(n) = if(!n, n, A030101(n/(2^valuation(n, 2))) * (2^valuation(n, 2)));
A243071(n) = if(n<=2, n-1, my(f=factor(n), p, 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]); ((3<<#binary(res\2))-res-1)); \\ (Combining programs given in A156552 and A054429)
CROSSREFS
Cf. A057889, A243071, A366275 (inverse map), A366277 (fixed points of map n -> a(n)).
Sequence in context: A014841 A056476 A056481 * A269386 A252756 A243071
KEYWORD
nonn
AUTHOR
Antti Karttunen, Oct 06 2023
STATUS
approved