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 A092693 #41 Nov 15 2021 01:26:48 %S A092693 0,1,3,3,7,3,9,7,9,7,17,7,19,9,15,15,31,9,27,15,19,17,39,15,35,19,27, %T A092693 19,47,15,45,31,35,31,39,19,55,27,39,31,71,19,61,35,39,39,85,31,61,35, %U A092693 63,39,91,27,71,39,55,47,105,31,91,45,55,63,79,35,101,63,79,39,109,39,111 %N A092693 Sum of iterated phi(n). %C A092693 Iannucci, Moujie and Cohen examine perfect totient numbers: n such that a(n) = n. %H A092693 T. D. Noe, <a href="/A092693/b092693.txt">Table of n, a(n) for n = 1..10000</a> %H A092693 C. Defant, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL18/Defant/defant5.html">On Arithmetic Functions Related to Iterates of the Schemmel Totient Functions</a>, J. Int. Seq. 18 (2015) # 15.2.1 %H A092693 P. Erdos and M. V. Subbarao, <a href="http://www.math.ualberta.ca/~subbarao/documents/Subbarao1.pdf">On the iterates of some arithmetic functions</a>, The theory of arithmetic functions (Proc. Conf., Western Michigan Univ., Kalamazoo, Mich. 1971), Lecture Notes in Math., 251 , pp. 119-125, Springer, Berlin, 1972. [<a href="http://www.renyi.hu/~p_erdos/1972-17.pdf">alternate link</a>] %H A092693 Douglas E. Iannucci, Deng Moujie and Graeme L. Cohen, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL6/Cohen2/cohen50.html">On perfect totient numbers</a>, J. Integer Sequences, 6 (2003), #03.4.5. %F A092693 a(1) = 0, a(n) = phi(n) + a(phi(n)) %F A092693 a(n) = A053478(n) - n. - _Vladeta Jovovic_, Jul 02 2004 %F A092693 Erdős & Subbarao prove that a(n) ~ phi(n) for almost all n. In particular, a(n) < n for almost all n. The proportion of numbers up to N for which a(n) > n is at most 1/log log log log N. - _Charles R Greathouse IV_, Mar 22 2012 %e A092693 a(100) = 71 because the iterations of phi (40, 16, 8, 4, 2, 1) sum to 71. %t A092693 nMax=100; a=Table[0, {nMax}]; Do[e=EulerPhi[n]; a[[n]]=e+a[[e]], {n, 2, nMax}]; a (* _T. D. Noe_ *) %t A092693 Table[Plus @@ FixedPointList[EulerPhi, n] - (n + 1), {n, 72}] (* _Alonso del Arte_, Jan 29 2007 *) %o A092693 (Haskell) %o A092693 a092693 1 = 0 %o A092693 a092693 n = (+ 1) $ sum $ takeWhile (/= 1) $ iterate a000010 $ a000010 n %o A092693 -- _Reinhard Zumkeller_, Oct 27 2011 %o A092693 (PARI) a(n)=my(k);while(n>1,k+=n=eulerphi(n));k \\ _Charles R Greathouse IV_, Mar 22 2012 %o A092693 (Python) %o A092693 from sympy import totient %o A092693 from math import prod %o A092693 def f(n): %o A092693 m = n %o A092693 while m > 1: %o A092693 m = totient(m) %o A092693 yield m %o A092693 def A092693(n): return sum(f(n)) # _Chai Wah Wu_, Nov 14 2021 %Y A092693 Cf. A003434 (iterations of phi(n) needed to reach 1), A092694 (iterated phi product). %Y A092693 Cf. A082897 and A091847 (perfect totient numbers). %K A092693 nonn %O A092693 1,3 %A A092693 _T. D. Noe_, Mar 04 2004