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.

A353732 Inverse permutation to A352808: a(n) = index where n appears in A352808.

This page as a plain text file.
%I A353732 #9 May 17 2022 17:45:13
%S A353732 0,1,2,6,3,4,10,11,5,7,8,18,12,19,32,44,9,16,14,24,13,17,15,45,20,21,
%T A353732 50,56,51,52,62,63,22,25,26,27,28,29,33,40,23,30,34,78,48,70,79,122,
%U A353732 36,64,38,84,37,71,82,98,83,85,94,123,92,148,134,210,31,41,35,46,42,47,43,72,49,53,57,73,54,76,128,162,39,65,58,96,55,68,60
%N A353732 Inverse permutation to A352808: a(n) = index where n appears in A352808.
%H A353732 Michael S. Branicky, <a href="/A353732/b353732.txt">Table of n, a(n) for n = 0..10000</a>
%o A353732 (Python)
%o A353732 from itertools import count, islice
%o A353732 def agen(): # generator of terms
%o A353732     A352808lst = [0, 1]; A352808set = {0, 1}; yield from [0, 1]
%o A353732     mink = 2
%o A353732     for n in count(2):
%o A353732         ahalf, k = A352808lst[n//2], mink
%o A353732         while k in A352808set or k&ahalf: k += 1
%o A353732         A352808lst.append(k); A352808set.add(k)
%o A353732         while mink in A352808set: yield A352808lst.index(mink); mink += 1
%o A353732 print(list(islice(agen(), 87))) # _Michael S. Branicky_, May 17 2022
%Y A353732 Cf. A353808, A353731.
%K A353732 nonn
%O A353732 0,3
%A A353732 _N. J. A. Sloane_, May 17 2022