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 A050012 #12 Oct 05 2019 11:32:05 %S A050012 1,7,3,21,10,5,2,14,98,49,24,12,6,42,294,147,73,36,18,9,4,28,196,1372, %T A050012 686,343,171,85,595,297,148,74,37,259,129,64,32,16,8,56,392,2744, %U A050012 19208,9604,4802,2401,1200,600,300,150,75,525,262 %N A050012 a(n) = floor(a(n-1)/2) if this is positive and not yet in the sequence, otherwise a(n) = 7*a(n-1). %H A050012 Ivan Neretin, <a href="/A050012/b050012.txt">Table of n, a(n) for n = 1..10000</a> %t A050012 Rest@Nest[Append[#, If[FreeQ[#, r = Quotient[#[[-1]], 2]], r, 7 #[[-1]]]] &, {0, 1}, 52] (* _Ivan Neretin_, Jul 31 2016 *) %o A050012 (PARI) first(n)=my(v=vector(n),t); v[1]=1; for(i=2,n, t=v[i-1]\2; if(t<2, v[i]=7*v[i-1]; next); for(j=1,i-1, if(v[j]==t, v[i]=7*v[i-1]; next(2))); v[i]=t); v \\ _Charles R Greathouse IV_, Jul 31 2016 %Y A050012 Cf. A050000 and references therein. %K A050012 nonn,easy %O A050012 1,2 %A A050012 _Clark Kimberling_