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.

A358851 a(n+1) is the number of occurrences of the largest digit of a(n) among all the digits of [a(0), a(1), ..., a(n)], with a(0)=0.

This page as a plain text file.
%I A358851 #46 Dec 23 2024 14:53:46
%S A358851 0,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1,10,11,13,2,2,3,3,4,2,4,3,5,2,5,
%T A358851 3,6,2,6,3,7,2,7,3,8,2,8,3,9,2,9,3,10,15,4,4,5,5,6,4,6,5,7,4,7,5,8,4,
%U A358851 8,5,9,4,9,5,10,17,6,6,7,7,8,6
%N A358851 a(n+1) is the number of occurrences of the largest digit of a(n) among all the digits of [a(0), a(1), ..., a(n)], with a(0)=0.
%C A358851 Up to a(19)=10, the terms are identical to A248034. The branches (distinct lines of terms indicating the largest digit of the preceding term) can be labeled by the counter digit (shown in the scatter plot). From 9 to 1 the branches gradually get fragmented. Below digit 5 it is harder to disentangle the branches in some places. A repeating pattern also appears (shown in the inset of the scatter plot).
%H A358851 Bence Bernáth, <a href="/A358851/b358851.txt">Table of n, a(n) for n = 0..10000</a>
%H A358851 Eric Angelini, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2014-October/013784.html">Digit-counters updating themselves</a>
%H A358851 Bence Bernáth, <a href="/A358851/a358851.jpg">Scatter plot for n=0..500000</a>
%H A358851 Michael De Vlieger, <a href="/A358851/a358851.png">Log log scatterplot of a(n)</a> n = 1..10^6.
%H A358851 Michael De Vlieger, <a href="/A358851/a358851_1.png">Log log scatterplot of a(n)</a>, n = 1..10^5, with a color function indicating largest digit of preceding term, where black = 0, red = 1, orange = 2, ..., magenta = 9.
%t A358851 nn = 79; s[_] = 0; a[0] = 0; Do[(Set[d, Max[#]]; Map[s[#1] += #2 & @@ # &, Tally[#] ]) &@ IntegerDigits[a[n - 1]]; a[n] = s[d], {n, nn}]; Array[a, nn + 1, 0] (* _Michael De Vlieger_, Dec 28 2022 *)
%o A358851 (MATLAB)
%o A358851 length_seq=150;
%o A358851 sequence(1)=0;
%o A358851 seq_for_digits=(num2str(sequence(1))-'0');
%o A358851 for i1=1:1:length_seq
%o A358851      sequence(i1+1)=sum(seq_for_digits==max((num2str(sequence(i1))-'0'))');
%o A358851      seq_for_digits=[seq_for_digits, num2str(sequence(i1+1))-'0'];
%o A358851 end
%o A358851 (Python)
%o A358851 sequence=[0]
%o A358851 length=150
%o A358851 seq_for_digits=list(map(int, list(str(sequence[0]))))
%o A358851 for ii in range(length):
%o A358851      sequence.append(seq_for_digits.count(max(list(map(int,list(str(sequence[-1])))))))
%o A358851      seq_for_digits.extend(list(map(int, list(str(sequence[-1])))))
%Y A358851 Cf. A248034, A249009, A356348, A336514.
%K A358851 nonn,base
%O A358851 0,4
%A A358851 _Bence Bernáth_, Dec 08 2022