cp's OEIS Frontend

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.

A385745 The sum of the iterated infinitary analog of the totient function A384247 when started at n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Jul 08 2025

Keywords

Examples

			  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
		

Crossrefs

Similar sequences: A092693, A329153, A333611.

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];
    a[n_] := Plus @@ NestWhileList[iphi, n, # != 1 &] - n; Array[a, 100]
  • 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));