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)).

This page as a plain text file.
%I A366276 #9 Oct 06 2023 21:24:12
%S A366276 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,
%T A366276 126,9,60,1023,22,2047,16,47,254,27,20,4095,510,95,56,8191,46,16383,
%U A366276 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
%N A366276 Permutation of nonnegative integers: a(n) = A057889(A243071(n)).
%H A366276 Antti Karttunen, <a href="/A366276/b366276.txt">Table of n, a(n) for n = 1..8192</a>
%H A366276 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%H A366276 <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>
%o A366276 (PARI)
%o A366276 A030101(n) = if(n<1,0,subst(Polrev(binary(n)),x,2));
%o A366276 A057889(n) = if(!n,n,A030101(n/(2^valuation(n,2))) * (2^valuation(n, 2)));
%o A366276 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)
%o A366276 A366276(n) = A057889(A243071(n));
%Y A366276 Cf. A057889, A243071, A366275 (inverse map), A366277 (fixed points of map n -> a(n)).
%K A366276 nonn
%O A366276 1,3
%A A366276 _Antti Karttunen_, Oct 06 2023