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.
%I A180076 #11 Mar 13 2014 16:36:16 %S A180076 0,1,4,2,7,3,10,5,16,8,25,6,19,9,28,12,37,18,55,11,34,17,52,13,40,20, %T A180076 61,14,43,21,64,32,97,24,73,36,109,22,67,33,100,50,151,23,70,35,106, %U A180076 26,79,15,46,139,69,208,80,241,30,91,27,82,41,124,31,94,47,142,71,214,53,160 %N A180076 a(n+1) = if it exists, smallest number not occurring earlier that is contained in binary representation of a(n), otherwise: a(n+1) = 3*a(n)+1; a(0) = 0. %C A180076 Permutation of the natural numbers with inverse A180077; %C A180076 if a(n-1) > a(n) then a(n) < a(n+1) = 3*a(n)+1; %C A180076 see A180110 for m with a(m-2) < a(m-1) < a(m); %C A180076 A180078(n) = a(a(n)); %C A180076 a(A180079(n)) = A180079(a(n)) = A180077(n); %C A180076 A180080 and A180081 give record values and where they occur. %H A180076 Reinhard Zumkeller, <a href="/A180076/b180076.txt">Table of n, a(n) for n = 0..10000</a> %H A180076 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a> %o A180076 (Haskell) %o A180076 import Data.List (delete) %o A180076 a180076 n = a180076_list !! n %o A180076 a180076_list :: [Integer] %o A180076 a180076_list = 0 : f 0 [1..] where %o A180076 f x zs = y : f y (delete y zs) where %o A180076 y = if null ys then 3 * x + 1 else head ys %o A180076 ys = [y | y <- takeWhile (< x) zs, binInfix y x] %o A180076 binInfix u v = ib v where %o A180076 ib w = w `mod` m == u || w > u && ib (w `div` 2) %o A180076 m = a062383 u %o A180076 -- _Reinhard Zumkeller_, Mar 13 2014, Feb 19 2013 %Y A180076 Cf. A007088, A016777. %Y A180076 Cf. A030308. %Y A180076 Cf. A062383. %K A180076 base,nonn %O A180076 0,3 %A A180076 _Reinhard Zumkeller_, Aug 14 2010