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 A050112 #12 Oct 05 2019 18:22:35 %S A050112 1,6,36,9,2,12,3,18,4,24,144,864,216,54,13,78,19,114,28,7,42,10,60,15, %T A050112 90,22,5,30,180,45,11,66,16,96,576,3456,20736,5184,1296,324,81,20,120, %U A050112 720,4320,1080,270,67,402,100,25,150,37,222,55 %N A050112 a(n) = floor(a(n-1)/4) if this is positive and not yet in the sequence, otherwise a(n) = 6*a(n-1). %H A050112 Ivan Neretin, <a href="/A050112/b050112.txt">Table of n, a(n) for n = 1..10000</a> %t A050112 Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 4]], r, 6 #[[-1]]]] &, {0, 1}, 54] (* _Ivan Neretin_, Jul 31 2016 *) %o A050112 (PARI) first(n)=my(v=vector(n),t); v[1]=1; for(i=2,n, t=v[i-1]\4; if(t<2, v[i]=6*v[i-1]; next); for(j=1,i-1, if(v[j]==t, v[i]=6*v[i-1]; next(2))); v[i]=t); v \\ _Charles R Greathouse IV_, Jul 31 2016 %Y A050112 Cf. A050000 and references therein. %K A050112 nonn %O A050112 1,2 %A A050112 _Clark Kimberling_