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.

A316472 Inverse permutation to A316385.

This page as a plain text file.
%I A316472 #19 Apr 21 2024 22:26:16
%S A316472 1,3,2,5,7,6,4,9,11,13,15,10,14,12,8,17,19,21,23,25,27,29,31,18,22,26,
%T A316472 30,20,28,24,16,33,35,37,39,41,43,45,47,49,51,53,55,57,59,61,63,34,38,
%U A316472 42,46,50,54,58,62,36,44,52,60,40,56,48,32,65,67,69,71
%N A316472 Inverse permutation to A316385.
%H A316472 Rémy Sigrist, <a href="/A316472/b316472.txt">Table of n, a(n) for n = 1..8191</a>
%H A316472 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%F A316472 a(n) = (2*b(n) + 1)*2^(L(n) - L(b(n)) - 1) where b(n) = A053645(A153142(n)) and where L(n) = A000523(n) for n > 0 with L(0) = -1. - _Mikhail Kurkov_, Sep 09 2023 [verification needed]
%e A316472 A316385(42) = 50 hence a(50) = 42.
%o A316472 (PARI) b1(n) = my(b=binary(n)); fromdigits(concat(b[1], Vecrev(vector(#b-1, k, b[k+1]))), 2); \\ A059893
%o A316472 b2(n) = if(n < 2, n, if((n + 1) == 2^logint(n + 1, 2), (n + 1) / 2, n + 1)) \\ A153152
%o A316472 a(n) = my(A = 2^logint(n, 2), B = b1(b2(b1(n))) - A); (2 * B + 1) * A / 2 ^ (if(B == 0, -1, logint(B, 2)) + 1) \\ _Mikhail Kurkov_, Sep 09 2023 [verification needed]
%Y A316472 Cf. A000523, A053645, A059893, A153142, A316385.
%K A316472 nonn,base
%O A316472 1,2
%A A316472 _Rémy Sigrist_, Jul 04 2018