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.

A359223 A "look-and-say" sequence. Describe the previous term by overstating the digit count by 1. a(1) = 1.

This page as a plain text file.
%I A359223 #28 Dec 29 2022 15:11:51
%S A359223 1,21,2221,4221,243221,2224233221,422422333221,24322432433221,
%T A359223 2224233224232224333221,42242233322422234224433221,
%U A359223 243224324332244223243234333221,22242332242322243332343223222423222324433221,42242233322422234224432223242332234224222342232234333221
%N A359223 A "look-and-say" sequence. Describe the previous term by overstating the digit count by 1. a(1) = 1.
%C A359223 The method mirrors that of the classic A005150 method A, with this modification: 1 is added to the true frequency, followed by digit-indication. The initial term is 1, and in our description for the next term we overstate by 1 how many 1's we see: "two 1's", that is 21.
%H A359223 Michael De Vlieger, <a href="/A359223/b359223.txt">Table of n, a(n) for n = 1..23</a>
%e A359223 Looking at a(3) = 2221 we see three 2's and one 1, but we overstate these counts by 1, saying "four 2's, two 1's", therefore a(4) = 4221.
%t A359223 NestList[FromDigits@ Flatten@ Map[Join[IntegerDigits[#2 + 1], IntegerDigits[#1]] & @@ # &, Apply[Join, Tally /@ SplitBy[IntegerDigits[#]]]] &, 1, 12] (* _Michael De Vlieger_, Dec 29 2022 *)
%o A359223 (Python)
%o A359223 from itertools import accumulate, groupby, islice, repeat
%o A359223 def LL(s, _): return "".join(str(len(list(g))+1)+k for k, g in groupby(s))
%o A359223 def agen(): yield from map(int, accumulate(repeat("1"), LL))
%o A359223 print(list(islice(agen(), 13))) # _Michael S. Branicky_, Dec 24 2022
%Y A359223 Cf. A005150, A022472 (number of 2's in a(n)).
%K A359223 nonn,base
%O A359223 1,2
%A A359223 _Tamas Sandor Nagy_, Dec 21 2022