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.

Showing 1-3 of 3 results.

A330400 Numbers at which the sum of the iterated unitary totient function (A329153) attains a record.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 16, 17, 29, 32, 41, 45, 53, 64, 73, 83, 85, 101, 113, 125, 128, 137, 153, 187, 197, 233, 257, 389, 401, 512, 577, 641, 677, 685, 703, 773, 901, 929, 977, 1153, 1193, 1493, 1537, 1553, 1657, 1697, 2047, 2048, 2313, 2897, 3089, 3137, 3593, 4001
Offset: 1

Views

Author

Amiram Eldar, Feb 25 2020

Keywords

Comments

Analogous to A181659 with the unitary totient function (A047994) instead of the Euler totient function phi (A000010).
The corresponding record values are 0, 1, 3, 6, 10, 16, 24, 39, 55, 70, 85, ... (see the link for more values).

Crossrefs

Programs

  • Mathematica
    uphi[1] = 1; uphi[n_] := Times @@ (-1 + Power @@@ FactorInteger[n]); s[n_] := Plus @@ FixedPointList[uphi, n] - n - 1; seq = {}; smax = -1; Do[s1 = s[n]; If[s1 > smax, smax = s1; AppendTo[seq, n]], {n, 1, 5000}]; seq

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));

A333611 Sum of the iterated infinitary totient function iphi (A091732).

Original entry on oeis.org

0, 1, 3, 6, 10, 3, 9, 6, 14, 10, 20, 9, 21, 9, 14, 29, 45, 14, 32, 21, 21, 20, 42, 9, 33, 21, 45, 32, 60, 14, 44, 29, 41, 45, 33, 33, 69, 32, 33, 21, 61, 21, 63, 44, 61, 42, 88, 44, 92, 33, 61, 69, 121, 45, 61, 32, 69, 60, 118, 33, 93, 44, 92, 106, 92, 41, 107
Offset: 1

Views

Author

Amiram Eldar, Mar 28 2020

Keywords

Examples

			a(3) = iphi(3) + iphi(iphi(3)) = 2 + 1 = 3.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := p^(2^(-1 + Position[Reverse @ IntegerDigits[e, 2], 1])); iphi[1] = 1; iphi[n_] := Times @@ (Flatten@(f @@@ FactorInteger[n]) - 1); a[n_] := Plus @@ NestWhileList[iphi, n, # != 1 &] - n; Array[a, 100]
Showing 1-3 of 3 results.