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 A385747 #5 Jul 12 2025 18:50:09 %S A385747 1,2,3,4,5,9,16,17,41,73,101,197,467,829,1109,2761,4849,7831,12401, %T A385747 26189,52379,85853,139589,237007,395533,947043,1967027,3446033, %U A385747 5396427,9510437,17502533,35005067,71202449,90187609,164664701,395199461,705113873,1265735729,1803553457 %N A385747 Least number that reaches 1 after exactly n iterations of the infinitary analog of the totient function A384247. %C A385747 a(n) is the least number k such that A385744(k) = n. %C A385747 Also, indices of records of A385744. %e A385747 n | a(n) | iterations %e A385747 --+------+--------------------------- %e A385747 1 | 2 | 2 -> 1 %e A385747 2 | 3 | 3 -> 2 -> 1 %e A385747 3 | 4 | 4 -> 3 -> 2 -> 1 %e A385747 4 | 5 | 5 -> 4 -> 3 -> 2 -> 1 %e A385747 5 | 9 | 9 -> 8 -> 4 -> 3 -> 2 -> 1 %t A385747 f[p_, e_] := p^e*(1 - 1/p^(2^(IntegerExponent[e, 2]))); iphi[1] = 1; iphi[n_] := iphi[n] = Times @@ f @@@ FactorInteger[n]; %t A385747 numiter[n_] := Length @ NestWhileList[iphi, n, # != 1 &] - 1; %t A385747 seq[len_] := Module[{s = {}, k = 0, i = 0}, While[Length[s] < len, k++; If[numiter[k] == i, AppendTo[s, k]; i++]]; s]; seq[25] %o A385747 (PARI) iphi(n) = {my(f = factor(n)); n * prod(i = 1, #f~, (1 - 1/f[i, 1]^(1 << valuation(f[i, 2], 2))));} %o A385747 numiter(n) = if(n == 1, 0, 1 + numiter(iphi(n))); %o A385747 list(len) = {my(k = 0, i = 0, c = 0); while(c < len, k++; if(numiter(k) == i, c++; print1(k, ", "); i++));} %Y A385747 Cf. A384247, A385744, A385745, A385746. %Y A385747 Similar sequences: A003271, A005424, A007755, A333610. %K A385747 nonn %O A385747 0,2 %A A385747 _Amiram Eldar_, Jul 08 2025