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 A329277 #22 Nov 05 2024 18:53:39 %S A329277 1,2,3,3,5,3,7,3,5,3,11,5,13,3,7,5,17,3,19,7,5,5,23,3,5,3,7,5,29,3,31, %T A329277 3,13,3,11,7,37,7,7,3,41,3,43,13,5,3,47,7,13,3,19,7,53,3,7,3,5,3,59,5, %U A329277 61,3,11,7,17,3,67,19,5,5,71,3,73,7,11,5,17,5,79 %N A329277 a(n) is the fixed point reached by iterating Euler's gradus function A275314 starting at n. %t A329277 gradus[n_] := 1 + Plus @@ ((First[#] - 1) * Last[#] & /@ FactorInteger[n]); a[n_] := FixedPoint[gradus, n]; Array[a, 100] (* _Amiram Eldar_, Nov 11 2019 *) %o A329277 (Python) %o A329277 from gmpy2 import is_prime %o A329277 from sympy import factorint %o A329277 def gradus(n): %o A329277 sum = 0 %o A329277 factors = factorint(n) %o A329277 for p,a in factors.items(): %o A329277 sum += (p - 1)*a %o A329277 return sum + 1 %o A329277 if __name__ == "__main__": %o A329277 glist = [] %o A329277 for x in range(1, 80): %o A329277 glist.append(gradus(x)) %o A329277 while True: %o A329277 for p in glist: %o A329277 a = 0 %o A329277 if not is_prime(p): %o A329277 glist = [gradus(x) for x in glist] %o A329277 a = 1 %o A329277 if a == 0: %o A329277 break %o A329277 print(', '.join([str(x) for x in glist])) %o A329277 (PARI) g(n) = my (f=factor(n)); 1+sum(k=1, #f~, f[k,2]*(f[k,1]-1)) %o A329277 a(n) = while (n!=n=g(n),); n \\ _Rémy Sigrist_, Dec 03 2019 %Y A329277 Cf. A275314, A329071. %K A329277 nonn %O A329277 1,2 %A A329277 _Daniel Hoyt_, Nov 11 2019