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.

A103684 Triangle read by rows, based on the morphism f: 1->{1,2}, 2->{1,3}, 3->{1}. First row is 1. If current row is a,b,c,..., then the next row is a,b,c,...,f(a),f(b),f(c),...

This page as a plain text file.
%I A103684 #22 Oct 31 2017 09:16:37
%S A103684 1,1,1,2,1,1,2,1,2,1,2,1,3,1,1,2,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,3,1,2,
%T A103684 1,3,1,2,1,1,1,2,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,3,1,2,1,3,1,2,1,1,2,1,
%U A103684 2,1,3,1,2,1,3,1,2,1,3,1,2,1,1,2,1,3,1,2,1,3,1,2,1,1,2,1,3,1,2,1,1,2,1,3,1
%N A103684 Triangle read by rows, based on the morphism f: 1->{1,2}, 2->{1,3}, 3->{1}. First row is 1. If current row is a,b,c,..., then the next row is a,b,c,...,f(a),f(b),f(c),...
%H A103684 G. C. Greubel, <a href="/A103684/b103684.txt">Table of n, a(n) for the first 8 rows, flattened</a>
%e A103684 [1], [1,1,2], [1,1,2,1,2,1,2,1,3], [1,1,2,1,2,1,2,1,3,1,2,1,2,1,3,1,2,1,3,1,2,1,3,1,2,1], ...
%t A103684 NestList[ Flatten[ Join[ #, # /. {1 -> {1, 2}, 2 -> {1, 3}, 3->{1}}]] &, {1}, 4] // Flatten (* _Robert G. Wilson v_, Jul 09 2006 - corrected by _G. C. Greubel_, Oct 26 2017 *)
%o A103684 (PARI) {a(n)=local(m,v,w); v=w=[1]; while(length(w)<n, m=length(v); for(k=1,m,v=concat(v,[[1,2],[1,3],[1]][v[k]])); w=concat(w,v)); w[n]} /* _Michael Somos_, Apr 16 2005 */
%Y A103684 Cf. A073058, A103685, A103682.
%K A103684 nonn,tabf
%O A103684 1,4
%A A103684 _Roger L. Bagula_, Mar 26 2005
%E A103684 Image of {3} in the definition corrected by _R. J. Mathar_, Nov 18 2010