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 A349251 #21 Nov 15 2021 10:53:48 %S A349251 1,2,3,4,5,6,7,8,9,1,2,3,4,5,6,7,8,9,1,4,6,8,1,3,5,7,9,4,8,9,3,6,9,6, %T A349251 3,9,9,9,9,7,4,3,4,6,9,7,6,48,3,5,9,3,7,9,5,5,9,9,3,9,3,48,9,9,9,9,6, %U A349251 9,9,3,5,9,3,9,9,9,9,6,8,9,9,9,9,9,5,8,9,9,7,9 %N A349251 a(n) is the integer reached after repeated application of the map x->A349194(x) or -1 if this process does not terminate. %C A349251 Heuristics suggest that numbers n such that a(n) = -1 have density 1 and may be quite dense by 10^10. - _Charles R Greathouse IV_, Nov 15 2021 %H A349251 Michel Marcus, <a href="/A349251/b349251.txt">Table of n, a(n) for n = 1..378</a> %e A349251 For n=19, A349194(19) = 10 and A349194(10) = 1 and 1 is a fixed point of A349194 (see A349190), so a(19)=1. %t A349251 f[n_] := Times @@ Accumulate @ IntegerDigits[n]; a[n_, itermax_] := Module[{m = FixedPoint[f, n, itermax]}, If[f[m] == m, m, 0]]; itermax = 100; Table[a[k, itermax], {k, 1, 100}] (* returns 0 if the number of iterations exceeds itermax, _Amiram Eldar_, Nov 12 2021 *) %o A349251 (PARI) f(n) = my(d=digits(n)); prod(i=1, #d, sum(j=1, i, d[j])); \\ A349194 %o A349251 a(n) = {my(nb=0); while (1, my(m=f(n)); nb++; if (m==n, return (m)); if (nb > 100, return (0)); n = m;);} %Y A349251 Cf. A349190, A349194. %K A349251 nonn,base %O A349251 1,2 %A A349251 _Michel Marcus_, Nov 12 2021