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 A374066 #23 Jun 30 2024 22:50:07 %S A374066 2,3,4,4,5,5,6,5,6,6,7,5,6,7,6,6,7,7,8,6,6,8,9,6,7,7,8,6,7,7,8,7,6,8, %T A374066 7,6,7,9,8,6,7,7,8,6,7,10,11,7,8,7,8,8,9,9,8,7,7,8,9,6,7,9,6,8,7,7,8, %U A374066 8,7,8,9,7,8,8,9,7,7,7,8,6,10,8,9,7,7,9,8,8,9 %N A374066 a(n) is the number of terms in the trajectory when the map x -> A067240(x) is iterated, starting from x = n until x = 0. %e A374066 For n=11, the trajectory from n down to 0 comprises a(11) = 7 terms: 11 -> 10 -> 5 -> 4 -> 2 -> 1 -> 0. %p A374066 f := proc(n) %p A374066 local e, j: %p A374066 e := ifactors(n)[2]: %p A374066 add((e[j][1] - 1) * e[j][1]^(e[j][2] - 1), j = 1 .. nops(e)) %p A374066 end proc: %p A374066 A374066:= proc(n) %p A374066 local count, current: %p A374066 count := 1: %p A374066 current := n: %p A374066 while current <> 0 do %p A374066 current := f(current): %p A374066 count := count + 1 %p A374066 end do: %p A374066 return count %p A374066 end proc: %p A374066 map(A374066, [$1..200]); %t A374066 f[p_, e_] := (p - 1)*p^(e - 1); s[n_] := s[n] = Plus @@ f @@@ FactorInteger[n]; a[n_] := Length[NestWhileList[s, n, # > 0 &]]; Array[a, 100] (* _Amiram Eldar_, Jun 27 2024 *) %Y A374066 Cf. A000010, A067240. %K A374066 nonn %O A374066 1,1 %A A374066 _Rafik Khalfi_, Jun 27 2024