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 A385745 #7 Jul 11 2025 01:27:45 %S A385745 0,1,3,6,10,3,9,10,18,10,20,9,21,9,18,33,49,18,36,21,21,20,42,18,42, %T A385745 21,36,36,64,18,48,49,41,49,42,42,78,36,42,49,89,21,63,48,81,42,88,48, %U A385745 96,42,81,78,130,36,89,42,78,64,122,42,102,48,96,96,96,41,107 %N A385745 The sum of the iterated infinitary analog of the totient function A384247 when started at n. %H A385745 Amiram Eldar, <a href="/A385745/b385745.txt">Table of n, a(n) for n = 1..10000</a> %e A385745 n | iterations | a(n) %e A385745 --+-----------------------+-------------------- %e A385745 2 | 2 -> 1 | 1 %e A385745 3 | 3 -> 2 -> 1 | 2 + 1 = 3 %e A385745 4 | 4 -> 3 -> 2 -> 1 | 3 + 2 + 1 = 6 %e A385745 5 | 5 -> 4 -> 3 -> 2 -> 1 | 4 + 3 + 2 + 1 = 10 %e A385745 6 | 6 -> 2 -> 1 | 2 + 1 = 3 %t A385745 f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n]; %t A385745 a[n_] := Plus @@ NestWhileList[iphi, n, # != 1 &] - n; Array[a, 100] %o A385745 (PARI) iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2)))); } %o A385745 a(n) = if(n == 1, 0, my(i = iphi(n)); i + a(i)); %Y A385745 Cf. A384247, A385744, A385746, A385747. %Y A385745 Similar sequences: A092693, A329153, A333611. %K A385745 nonn,easy %O A385745 1,3 %A A385745 _Amiram Eldar_, Jul 08 2025