login
The OEIS is supported by the many generous donors to the OEIS 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
1, 2, 3, 111213, 412223, 51423314, 7152433415, 515253543517, 613263548527, 5142634495263718, 515263549546372819, 516263648566373839, 515283648596374849, 414283649596376859, 3132837475106377869, 10413283746576677869, 20513283644596976859, 30514283545596976859 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
From the 1458th term the sequence goes into a cycle of 850 terms.
LINKS
EXAMPLE
1, 2, 3 => there are one '1', one '2' and one '3': 111213;
2, 3, 111213 => there are four '1', two '2' and two '3': 412223;
3, 111213, 412223 => there are five '1', four '2', three '3', one '4': 51423314.
MAPLE
P:=proc(q) local a, b, c, d, k, n, y, x; y:=array(1..3); x:=array(0..9);
y[1]:=1; y[2]:=2; y[3]:=3;
print(1); print(2); print(3); a:=[]; b:=[1]; c:=[2];
for n from 1 to q do for k from 0 to 9 do x[k]:=0; od;
a:=b; b:=c; c:=convert(y[3], base, 10);
for k from 1 to nops(a) do x[a[k]]:=x[a[k]]+1; od;
for k from 1 to nops(b) do x[b[k]]:=x[b[k]]+1; od;
for k from 1 to nops(c) do x[c[k]]:=x[c[k]]+1; od;
y[1]:=y[2]; y[2]:=y[3]; y[3]:=0;
for k from 0 to 9 do if x[k]>0 then if k=0 then d:=10*x[k];
else d:=10*x[k]+k; fi; y[3]:=y[3]*10^(ilog10(d)+1)+d; fi; od;
print(y[3]); od; end: P(10^2);
MATHEMATICA
Nest[Append[#, FromDigits[Join @@ Map[Flatten@ Reverse@ # &, IntegerDigits@ Sort@ Tally[Join @@ IntegerDigits[#[[-3 ;; -1]]]]]]] &, {1, 2, 3}, 15] (* Michael De Vlieger, Mar 01 2018 *)
CROSSREFS
Sequence in context: A128668 A216977 A331426 * A328211 A324154 A038537
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava, Feb 28 2018
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 06:39 EDT 2024. Contains 371920 sequences. (Running on oeis4.)