login
A385745
The sum of the iterated infinitary analog of the totient function A384247 when started at n.
4
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, 21, 36, 36, 64, 18, 48, 49, 41, 49, 42, 42, 78, 36, 42, 49, 89, 21, 63, 48, 81, 42, 88, 48, 96, 42, 81, 78, 130, 36, 89, 42, 78, 64, 122, 42, 102, 48, 96, 96, 96, 41, 107
OFFSET
1,3
LINKS
EXAMPLE
n | iterations | a(n)
--+-----------------------+--------------------
2 | 2 -> 1 | 1
3 | 3 -> 2 -> 1 | 2 + 1 = 3
4 | 4 -> 3 -> 2 -> 1 | 3 + 2 + 1 = 6
5 | 5 -> 4 -> 3 -> 2 -> 1 | 4 + 3 + 2 + 1 = 10
6 | 6 -> 2 -> 1 | 2 + 1 = 3
MATHEMATICA
f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n];
a[n_] := Plus @@ NestWhileList[iphi, n, # != 1 &] - n; Array[a, 100]
PROG
(PARI) iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2)))); }
a(n) = if(n == 1, 0, my(i = iphi(n)); i + a(i));
CROSSREFS
Similar sequences: A092693, A329153, A333611.
Sequence in context: A330376 A120028 A333611 * A329153 A337771 A232175
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Jul 08 2025
STATUS
approved