A385746 Numbers that are equal to the sum of their iterated infinitary analog of the totient function A384247.
3, 10, 18, 21, 48, 160, 288, 3252, 9304, 13965, 68526, 719631, 1531101, 1954782, 28900572, 39189195, 14708055957
Offset: 1
Examples
n | a(n) | iterations | sum --+------+-----------------------------------+---------------------------- 1 | 3 | 3 -> 2 -> 1 | 2 + 1 = 3 2 | 10 | 10 -> 4 -> 3 -> 2 -> 1 | 4 + 3 + 2 + 1 = 10 3 | 18 | 18 -> 8 -> 4 -> 3 -> 2 -> 1 | 8 + 4 + 3 + 2 + 1 = 18 4 | 21 | 21 -> 12 -> 6 -> 2 -> 1 | 12 + 6 + 2 + 1 = 21 5 | 48 | 48 -> 30 -> 8 -> 4 -> 3 -> 2 -> 1 | 30 + 8 + 4 + 3 + 2 + 1 = 48
Programs
-
Mathematica
f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n]; infPerfTotQ[n_] := Plus @@ FixedPointList[iphi, n] == 2*n + 1; infPerfTotQ[1] = False; Select[Range[10^5], infPerfTotQ]
-
PARI
iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2)))); } s(n) = if(n == 1, 0, my(i = iphi(n)); i + s(i)); isok(k) = s(k) == k;
Comments