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.
%I A282535 #16 Feb 27 2017 11:11:16 %S A282535 3,4,7,4,7,7,7,6,7,6,7,7,7,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,8,8,8, %T A282535 8,8,8,8,8,8,8 %N A282535 a(n) is the maximum number of "describing"-steps for an n-chain before entering a loop. %C A282535 Conjecture: The size of terms of this sequence is unbounded (cf. Marichal, 2007, Corollary 5). %H A282535 Jean-Luc Marichal, <a href="https://arxiv.org/abs/0708.1491">On perfect, amicable, and sociable chains</a>, arXiv:0708.1491 [math.CO], 2007. %o A282535 (PARI) %o A282535 pad(d, n) = while(#d != n, d = concat([0], d)); d; %o A282535 say(d, n) = vector(n, k, sum(j=1, #d, d[j] == (k-1))); %o A282535 isok(v, n) = my(vs = vecsort(v,,8)); (#vs > 1) && (#vs <n); %o A282535 vsearch(v, x) = for (i=1, #v, if (v[i] == x, return (i));); %o A282535 a(n) = {nmax = 0; for (i=0, n^n-1, d = digits(i, n); d = pad(d, n); circuit = [i]; pos = 0; if (isok(d, n), while (! pos, sd = say(d, n); if (! isok(sd, n), break); isd = fromdigits(sd, n); pos = vsearch(circuit, isd); if (! pos, circuit = concat(isd, circuit); d = sd, start = #circuit - pos; nmax = max(nmax, start); );););); nmax;} \\ _Michel Marcus_, Feb 25 2017 %Y A282535 Cf. A046043, A108551. %K A282535 nonn,more %O A282535 4,1 %A A282535 _Felix Fröhlich_, Feb 17 2017 %E A282535 Name edited by _Michel Marcus_, Feb 26 2017