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 A366927 #28 Nov 14 2023 09:23:52 %S A366927 0,1,2,1,2,2,3,1,2,2,3,2,3,3,3,1,2,2,3,2,3,3,4,2,2,3,2,3,4,3,4,1,4,2, %T A366927 4,2,3,3,3,2,3,3,4,3,3,4,5,2,3,2,3,3,4,2,3,3,3,4,5,3,4,4,3,1,4,4,5,2, %U A366927 5,4,5,2,3,3,3,3,5,3,4,2,2,3,4,3,3,4,4,3,4,3,4,4,4,5,4,2,3,3,4,2,3,3,4,3,4 %N A366927 Number of distinct primes p used in the mapping of k = k - k/p terminating at 1, where p is any of the prime factors of k. %C A366927 A001221(n) <= a(n) <= pi(n) = A000720(n). %C A366927 Just because some prime < n is not a prime factor of n does not preclude it from being a prime used in the cascade from n to 1. Take, for instance, n=14; 14 -> 12 and 3 is a prime factor of 12 but not of 14. %C A366927 If p is a prime factor of n, then a(p^e * n) = a(n), where e is any exponent. %C A366927 The number of primes p counting multiplicity is obviously the same as the path length, A332810. For n>1, 2 is always one of the primes. %e A366927 a(1) = 0 because 1 is at the end of all iterations; %e A366927 a(2) = 1 since 2 -> 2 - 2/2 = 1, so there is one iteration of the mapping and it only involves the prime 2; %e A366927 a(3) = 2 since 3 -> 2 -> 1 and this involves two primes, 2 and 3; %e A366927 a(7) = 3 since 7 -> 6 -> 3 or 2 and this involves three primes, 7, 3, and 2; etc. %t A366927 a[n_] := Block[{m = n, p, lst = {}}, While[m > 1, p = FactorInteger[m][[1, 1]]; AppendTo[lst, p]; m = m - m/p]; Length@ Union@ lst]; Array[a, 105] %Y A366927 Cf. A366929 (records). %K A366927 nonn %O A366927 1,3 %A A366927 _Robert G. Wilson v_, Oct 31 2023