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 A133579 #30 Jan 22 2019 02:50:52 %S A133579 1,1,3,1,3,9,3,9,27,3,9,27,9,27,81,27,81,243,27,81,243,81,243,729,243, %T A133579 729,2187,81,243,729,243,729,2187,729,2187,6561,729,2187,6561,2187, %U A133579 6561,19683,6561,19683,59049,6561,19683,59049,19683,59049,177147 %N A133579 a(0)=a(1)=1; for n > 1, a(n) = 3*a(n-1) if a(n-1) and n are coprime, otherwise a(n) = a(n-1)/gcd(a(n-1), n). %H A133579 Harvey P. Dale, <a href="/A133579/b133579.txt">Table of n, a(n) for n = 0..1000</a> %p A133579 f:=proc(n) option remember; %p A133579 if n <= 1 then 1 %p A133579 elif gcd(n,f(n-1))>1 then f(n-1)/gcd(n,f(n-1)) %p A133579 else 3*f(n-1); fi; end; %p A133579 [seq(f(n),n=0..50)]; %p A133579 # _N. J. A. Sloane_, Feb 14 2015 %t A133579 nxt[{n_,a_}]:={n+1,If[CoprimeQ[a,n+1],3a,a/GCD[a,n+1]]}; Join[{1}, Transpose[ NestList[nxt,{1,1},50]][[2]]] (* _Harvey P. Dale_, Feb 14 2015 *) %o A133579 (PARI) A=vector(1000,i,1);for(n=2,#A,A[n]=if(gcd(A[n-1],n)>1,A[n-1]/gcd(A[n-1],n),A[n-1]*3)) \\ _M. F. Hasler_, Feb 15 2015 %Y A133579 Cf. A133058, A133580, A253092. %K A133579 nonn %O A133579 0,3 %A A133579 _Ctibor O. Zizka_, Dec 26 2007 %E A133579 Offset, definition, and terms corrected by _N. J. A. Sloane_, Feb 14 2015