cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A366276 Permutation of nonnegative integers: a(n) = A057889(A243071(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 06 2023

Keywords

Crossrefs

Cf. A057889, A243071, A366275 (inverse map), A366277 (fixed points of map n -> a(n)).

Programs

  • 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)
    A366276(n) = A057889(A243071(n));