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 A287841 #14 Feb 16 2025 08:33:47 %S A287841 1,2,2,2,2,3,2,2,2,3,2,3,2,3,3,2,2,3,2,3,3,3,2,3,2,3,2,3,2,3,2,2,3,3, %T A287841 3,3,2,3,3,3,2,3,2,3,3,3,2,3,2,3,3,3,2,3,3,3,3,3,2,3,2,3,3,2,3,3,2,3, %U A287841 3,3,2,3,2,3,3,3,3,3,2,3,2,3,2,3,3,3,3,3,2,3,3,3,3,3,3,3,2,3,3,3,2,3,2,3,3 %N A287841 Number of iterations of number of distinct prime factors (A001221) needed to reach 1 starting at n (n is counted). %H A287841 Antti Karttunen, <a href="/A287841/b287841.txt">Table of n, a(n) for n = 1..16384</a> %H A287841 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/DistinctPrimeFactors.html">Distinct Prime Factors</a> %H A287841 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A287841 a(n) = a(omega(n)) + 1 for n > 1, where omega() is the number of distinct prime factors. %e A287841 If n = 6 the trajectory is {6, 2, 1}. Its length is 3, thus a(6) = 3. %t A287841 f[n_] := Length[NestWhileList[ PrimeNu, n, # != 1 &]]; Array[f, 105] %t A287841 a[1] = 1; a[n_] := a[n] = a[PrimeNu[n]] + 1; Table[a[n], {n, 105}] %o A287841 (PARI) A287841(n) = if(1==n,n,1+A287841(omega(n))); \\ _Antti Karttunen_, Nov 23 2017 %o A287841 (Python) %o A287841 from sympy import primefactors %o A287841 def a(n): return 1 if n==1 else a(len(primefactors(n))) + 1 # _Indranil Ghosh_, Jun 03 2017 %Y A287841 Cf. A001221, A036430, A036459, A049108, A073855, A115658 (first occurrence), A246655 (positions of 2). %K A287841 nonn %O A287841 1,2 %A A287841 _Ilya Gutkovskiy_, Jun 01 2017