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.

A300191 Look and Say the digits of the last three terms, by increasing digit value. Start with a(1)=1, a(2)=2 and a(3)=3.

This page as a plain text file.
%I A300191 #20 Nov 05 2023 15:17:17
%S A300191 1,2,3,111213,412223,51423314,7152433415,515253543517,613263548527,
%T A300191 5142634495263718,515263549546372819,516263648566373839,
%U A300191 515283648596374849,414283649596376859,3132837475106377869,10413283746576677869,20513283644596976859,30514283545596976859
%N A300191 Look and Say the digits of the last three terms, by increasing digit value. Start with a(1)=1, a(2)=2 and a(3)=3.
%C A300191 From the 1458th term the sequence goes into a cycle of 850 terms.
%H A300191 Jinyuan Wang, <a href="/A300191/b300191.txt">Table of n, a(n) for n = 1..3200 (first 1937 terms from Paolo P. Lava)</a>
%e A300191 1, 2, 3 => there are one '1', one '2' and one '3': 111213;
%e A300191 2, 3, 111213 => there are four '1', two '2' and two '3': 412223;
%e A300191 3, 111213, 412223 => there are five '1', four '2', three '3', one '4': 51423314.
%p A300191 P:=proc(q) local a,b,c,d,k,n,y,x; y:=array(1..3); x:=array(0..9);
%p A300191 y[1]:=1; y[2]:=2; y[3]:=3;
%p A300191 print(1); print(2); print(3); a:=[]; b:=[1]; c:=[2];
%p A300191 for n from 1 to q do for k from 0 to 9 do x[k]:=0; od;
%p A300191 a:=b; b:=c; c:=convert(y[3],base,10);
%p A300191 for k from 1 to nops(a) do x[a[k]]:=x[a[k]]+1; od;
%p A300191 for k from 1 to nops(b) do x[b[k]]:=x[b[k]]+1; od;
%p A300191 for k from 1 to nops(c) do x[c[k]]:=x[c[k]]+1; od;
%p A300191 y[1]:=y[2]; y[2]:=y[3]; y[3]:=0;
%p A300191 for k from 0 to 9 do if x[k]>0 then if k=0 then d:=10*x[k];
%p A300191 else d:=10*x[k]+k; fi; y[3]:=y[3]*10^(ilog10(d)+1)+d; fi; od;
%p A300191 print(y[3]); od; end: P(10^2);
%t A300191 Nest[Append[#, FromDigits[Join @@ Map[Flatten@ Reverse@ # &, IntegerDigits@ Sort@ Tally[Join @@ IntegerDigits[#[[-3 ;; -1]]]]]]] &, {1, 2, 3}, 15] (* _Michael De Vlieger_, Mar 01 2018 *)
%Y A300191 Cf. A036058, A036059, A036066, A036067.
%K A300191 nonn,base,easy
%O A300191 1,2
%A A300191 _Paolo P. Lava_, Feb 28 2018