login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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. 1

%I

%S 1,2,3,111213,412223,51423314,7152433415,515253543517,613263548527,

%T 5142634495263718,515263549546372819,516263648566373839,

%U 515283648596374849,414283649596376859,3132837475106377869,10413283746576677869,20513283644596976859,30514283545596976859

%N 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 From 1458th term the sequence goes into a cycle of 850 terms.

%H 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 1, 2, 3 => there are one '1', one '2' and one '3': 111213;

%e 2, 3, 111213 => there are four '1', two '2' and two '3': 412223;

%e 3, 111213, 412223 => there are five '1', four '2', three '3', one '4': 51423314.

%p P:=proc(q) local a,b,c,d,k,n,y,x; y:=array(1..3); x:=array(0..9);

%p y[1]:=1; y[2]:=2; y[3]:=3;

%p print(1); print(2); print(3); a:=[]; b:=[1]; c:=[2];

%p for n from 1 to q do for k from 0 to 9 do x[k]:=0; od;

%p a:=b; b:=c; c:=convert(y[3],base,10);

%p for k from 1 to nops(a) do x[a[k]]:=x[a[k]]+1; od;

%p for k from 1 to nops(b) do x[b[k]]:=x[b[k]]+1; od;

%p for k from 1 to nops(c) do x[c[k]]:=x[c[k]]+1; od;

%p y[1]:=y[2]; y[2]:=y[3]; y[3]:=0;

%p for k from 0 to 9 do if x[k]>0 then if k=0 then d:=10*x[k];

%p else d:=10*x[k]+k; fi; y[3]:=y[3]*10^(ilog10(d)+1)+d; fi; od;

%p print(y[3]); od; end: P(10^2);

%t 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 Cf. A036058, A036059, A036066, A036067.

%K nonn,base,easy,changed

%O 1,2

%A _Paolo P. Lava_, Feb 28 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 18 09:15 EST 2020. Contains 332011 sequences. (Running on oeis4.)