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-9 of 9 results.

A328858 Numbers with a record number of distinct values of the Euler totient function applied to their divisors (A319696).

Original entry on oeis.org

1, 3, 8, 15, 32, 45, 72, 105, 144, 216, 288, 432, 792, 864, 1296, 1584, 1728, 2376, 2592, 3168, 4752, 9504, 14256, 19008, 28512, 38016, 54000, 57024, 85536, 108000, 114048, 162000, 171072, 216000, 218592, 228096, 324000, 342144, 437184, 465696, 648000, 655776
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2019

Keywords

Comments

The corresponding record values are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 16, 17, 18, 19, 20, 21, 22, 26, 32, 34, 38, 42, 44, 45, 50, 52, 54, 58, 59, 62, 63, 64, 66, 71, 72, 76, 78, 83, 84, ...

Examples

			The first 10 terms of A319696(k) are 1, 1, 2, 2, 2, 2, 2, 3, 3, 2. The record values 1, 2, and 3 are obtained at k = 1, 3, and 8. Therefore this sequence begins with 1, 3, 8.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Length @ Union[EulerPhi /@ Divisors[n]]; fm = 0; s = {}; Do[f1 = f[n]; If[f1 > fm, fm = f1; AppendTo[s, n]], {n, 1, 660000}]; s

A328859 Indices k of records of low value in the ratios A319696(k)/A000005(k) between the number of distinct values of the Euler totient function applied to the divisors of k and the number of divisors of k.

Original entry on oeis.org

1, 2, 60, 120, 240, 480, 960, 1920, 3840, 4080, 8160, 16320, 32640, 65280, 130560, 261120, 522240, 1044480, 1485120, 2227680, 2970240, 4455360, 8910720, 17821440, 35642880, 42325920, 63488880, 69090840, 84651840, 126977760, 169303680, 253955520, 507911040, 761866560
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2019

Keywords

Comments

The maximal possible value of the ratio A319696(k)/A000005(k) is 1 which occurs at the terms of A326835.
The rounded values of the corresponding ratios are 1, 0.5, 0.417, 0.375, 0.35, 0.333, 0.321, 0.313, 0.306, 0.275, 0.25, 0.232, 0.219, 0.208, 0.2, 0.193, 0.188, 0.183, 0.179, 0.170, 0.168, 0.158, 0.148, 0.141, 0.135, 0.132, 0.130, 0.129, 0.122, 0.117, 0.115, 0.108, 0.102, 0.101, ...

Crossrefs

Programs

  • Mathematica
    r[n_] := Length @ Union[EulerPhi /@ (d = Divisors[n])]/Length[d]; rm = 2; s = {}; Do[r1 = r[n]; If[r1 < rm, rm = r1; AppendTo[s, n]], {n, 1, 10^5}]; s

A326835 Numbers whose divisors have distinct values of the Euler totient function (A000010).

Original entry on oeis.org

1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 65, 67, 69, 71, 73, 75, 77, 79, 81, 83, 85, 87, 89, 91, 93, 95, 97, 99, 101, 103, 105, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127
Offset: 1

Views

Author

Amiram Eldar, Oct 28 2019

Keywords

Comments

Since Sum_{d|k} phi(d) = k, these are numbers k such that the set {phi(d) | d|k} is a partition of k into distinct parts.
Includes all the odd prime numbers, since an odd prime p has 2 divisors, 1 and p, whose phi values are 1 and p-1.
If k is a term, then all the divisors of k are also terms. If k is not a term, then all its multiples are not terms. The primitive terms of the complementary sequence are 2, 63, 273, 513, 585, 825, 2107, 2109, 2255, 3069, ....
In particular, all the terms are odd since 2 is not a term (phi(1) = phi(2)).
The number of terms below 10^k for k = 1, 2, ... are 5, 49, 488, 4860, 48598, 485807, 4857394, 48572251, 485716764, 4857144075, ...
Apparently the sequence has an asymptotic density of 0.4857...

Examples

			3 is a term since it has 2 divisors, 1 and 3, and phi(1) = 1 != phi(3) = 2.
15 is a term since the phi values of its divisors, {1, 3, 5, 15}, are distinct: {1, 2, 4, 8}.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local D;
      D:=numtheory:-divisors(n);
      nops(D) = nops(map(numtheory:-phi,D))
    end proc:
    select(filter, [seq(i,i=1..200,2)]); # Robert Israel, Oct 29 2019
  • Mathematica
    aQ[n_] := Length @ Union[EulerPhi /@ (d = Divisors[n])] == Length[d];  Select[Range[130], aQ]
  • PARI
    isok(k) = #Set(apply(x->eulerphi(x), divisors(k))) == numdiv(k); \\ Michel Marcus, Oct 28 2019

Formula

Numbers k such that A319696(k) = A000005(k).
Numbers k such that A319695(k) = A032741(k).
Numbers k such that the k-th row of A102190 has distinct terms.

A348158 a(n) is the sum of the distinct values obtained when the Euler totient function is applied to the divisors of n.

Original entry on oeis.org

1, 1, 3, 3, 5, 3, 7, 7, 9, 5, 11, 7, 13, 7, 15, 15, 17, 9, 19, 15, 21, 11, 23, 15, 25, 13, 27, 21, 29, 15, 31, 31, 33, 17, 35, 25, 37, 19, 39, 31, 41, 21, 43, 33, 45, 23, 47, 31, 49, 25, 51, 39, 53, 27, 55, 49, 57, 29, 59, 31, 61, 31, 57, 63, 65, 33, 67, 51, 69
Offset: 1

Views

Author

Amiram Eldar, Oct 03 2021

Keywords

Comments

The sum of the distinct values of the n-th row of A102190.
Apparently, all the terms are odd.

Examples

			The divisors of 12 are {1, 2, 3, 4, 6, 12} and their phi values are {1, 1, 2, 2, 2, 4}. The set of distinct values is {1, 2, 4} whose sum is 7. Therefore, a(12) = 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory):
    a:= n-> add(i, i=map(phi, divisors(n))):
    seq(a(n), n=1..69);  # Alois P. Heinz, Nov 15 2021
  • Mathematica
    a[n_] := Plus @@ DeleteDuplicates @ Map[EulerPhi, Divisors[n]]; Array[a, 100]
  • PARI
    a(n) = vecsum(Set(apply(eulerphi, divisors(n)))); \\ Michel Marcus, Oct 04 2021
    
  • Python
    from sympy import totient, divisors
    def A348158(n): return sum(set(map(totient,divisors(n,generator=True)))) # Chai Wah Wu, Nov 15 2021

Formula

a(n) <= n, with equality if and only if n is in A326835.

A319695 Number of distinct values obtained when Euler phi (A000010) is applied to proper divisors of n.

Original entry on oeis.org

0, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 3, 3, 1, 3, 1, 3, 3, 2, 1, 3, 2, 2, 3, 3, 1, 4, 1, 4, 3, 2, 3, 4, 1, 2, 3, 4, 1, 4, 1, 3, 5, 2, 1, 4, 2, 3, 3, 3, 1, 4, 3, 5, 3, 2, 1, 4, 1, 2, 4, 5, 3, 4, 1, 3, 3, 4, 1, 6, 1, 2, 5, 3, 3, 4, 1, 5, 4, 2, 1, 5, 3, 2, 3, 5, 1, 6, 3, 3, 3, 2, 3, 5, 1, 3, 5, 5, 1, 4, 1, 5, 7
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Examples

			For n = 6, it has three proper divisors: 1, 2, 3, and applying A000010 to these gives 1, 1 and 2, with just two distinct values, thus a(6) = 2.
		

Crossrefs

Cf. also A304793, A305611, A316555, A316556, A319685 for similarly constructed sequences.

Programs

  • PARI
    A319695(n) = { my(m=Map(),s,k=0); fordiv(n,d,if((d
    				

A348001 Number of distinct values obtained when the unitary totient function (A047994) is applied to the unitary divisors of n.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 4, 4, 2, 2, 4, 2, 2, 2, 4, 2, 4, 2, 2, 4, 2, 4, 4, 2, 2, 4, 4, 2, 4, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 2, 4, 4, 4, 2, 2, 8, 2, 2, 4, 2, 4, 4, 2, 4, 4, 4, 2, 4, 2, 2, 4, 4, 4, 4, 2, 4, 2, 2, 2, 7, 4, 2, 4
Offset: 1

Views

Author

Amiram Eldar, Sep 23 2021

Keywords

Examples

			n = 6 has four unitary divisors: 1, 2, 3 and 6. Applying A047994 to these gives 1, 1, 2 and 2, with just 2 distinct values, thus a(6) = 2.
n = 12 has four unitary divisors: 1, 3, 4 and 12. Applying A047994 to these gives 4 distinct values, 1, 2, 3 and 6, thus a(12) = 4.
		

Crossrefs

The unitary version of A319696.

Programs

  • Mathematica
    f[p_, e_] := p^e - 1; uphi[1] = 1; uphi[n_] := Times @@ f @@@ FactorInteger[n]; a[n_] := Length @ Union[uphi /@ Select[Divisors[n], CoprimeQ[#, n/#] &]]; Array[a,100]

Formula

a(2^e) = 2 for e > 1.
a(p^e) = 2 for an odd prime p and e > 0.
a(n) >= omega(n), with equality if and only if n is in A278568.

A319686 Number of distinct values obtained when arithmetic derivative (A003415) is applied to the divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 2, 3, 2, 4, 3, 3, 2, 5, 2, 3, 3, 5, 2, 5, 2, 5, 3, 3, 2, 7, 3, 3, 4, 5, 2, 6, 2, 6, 3, 3, 3, 8, 2, 3, 3, 7, 2, 6, 2, 5, 5, 3, 2, 9, 3, 5, 3, 5, 2, 7, 3, 7, 3, 3, 2, 10, 2, 3, 5, 7, 3, 6, 2, 5, 3, 6, 2, 11, 2, 3, 5, 5, 3, 6, 2, 9, 5, 3, 2, 10, 3, 3, 3, 7, 2, 10, 3, 5, 3, 3, 3, 11, 2, 5, 5, 8, 2, 6, 2, 7, 6, 3, 2, 11, 2, 6, 3, 8, 2, 6, 3, 5, 5, 3, 3, 14
Offset: 1

Views

Author

Antti Karttunen, Oct 02 2018

Keywords

Crossrefs

One more than A319685.
Cf. A003415.
Cf. also A184395, A319696.

Programs

  • Mathematica
    d[0] = d[1] = 0; d[n_] := d[n] = n * Plus @@ ((Last[#]/First[#]) & /@ FactorInteger[n]); a[n_] := CountDistinct[d /@ Divisors[n]]; Array[a, 100] (* Amiram Eldar, Apr 17 2024 *)
  • PARI
    A003415(n) = {my(fac); if(n<1, 0, fac=factor(n); sum(i=1, matsize(fac)[1], n*fac[i, 2]/fac[i, 1]))}; \\ From A003415
    A319686(n) = { my(m=Map(),s,k=0); fordiv(n,d,if(!mapisdefined(m,s=A003415(d)), mapput(m,s,s); k++)); (k); };
    
  • PARI
    a(n) = my(d = divisors(n)); for(i = 1, #d, d[i] = A003415(d[i])); #Set(d) \\ uses A003415 listed at Antti's programs. David A. Corneth, Oct 02 2018

Formula

a(n) = 1+A319685(n).

A361923 Number of distinct values obtained when the infinitary totient function (A091732) is applied to the infinitary divisors of n.

Original entry on oeis.org

1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 4, 2, 2, 4, 2, 4, 4, 2, 2, 4, 4, 2, 4, 2, 4, 4, 2, 2, 4, 2, 2, 4, 4, 2, 4, 4, 4, 4, 2, 2, 8, 2, 2, 4, 4, 4, 4, 2, 4, 4, 4, 2, 4, 2, 2, 4, 4, 4, 4, 2, 4, 2, 2, 2, 7, 4, 2, 4
Offset: 1

Views

Author

Amiram Eldar, Mar 30 2023

Keywords

Comments

First differs from A348001 at n = 27.

Crossrefs

Similar sequences: A319696, A348001.

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);
    idivs[n_] := Sort@ Flatten@ Outer[Times, Sequence @@ (FactorInteger[n] /. {p_, m_Integer} :> p^Select[Range[0, m], BitOr[m, #] == m &])]; idivs[1] = {1};
    a[n_] := Length @ Union[iphi /@ idivs[n]]; Array[a, 100]
  • PARI
    iphi(n) = {my(f=factor(n), b); prod(i=1, #f~, b = binary(f[i, 2]); prod(k=1, #b, if(b[k], f[i, 1]^(2^(#b-k)) - 1, 1)))}
    isidiv(d, f) = {if (d==1, return (1)); for (k=1, #f~, bne = binary(f[k, 2]); bde = binary(valuation(d, f[k, 1])); if (#bde < #bne, bde = concat(vector(#bne-#bde), bde)); for (j=1, #bne, if (! bne[j] && bde[j], return (0)); ); ); return (1); }
    idivs(n) = {my(d = divisors(n), f = factor(n), idiv = []); for (k=1, #d, if(isidiv(d[k], f), idiv = concat(idiv, d[k])); ); idiv; } \\ Michel Marcus at A077609
    a(n) = {my(d = idivs(n)); #Set(apply(x->iphi(x), d));}

A373531 a(n) is the maximum number of divisors of n with an equal value of the Euler totient function (A000010).

Original entry on oeis.org

1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 2, 1, 2, 1, 3, 1, 2, 1, 3, 1, 2, 1
Offset: 1

Views

Author

Amiram Eldar, Jun 08 2024

Keywords

Comments

The sums of the first 10^k terms, for k = 1, 2, ..., are 15, 161, 1641, 16554, 166029, 1662306, 16630535, 166335597, 1663473941, 16635216306, ... . Apparently, this sequence has an asymptotic mean 1.663... .

Examples

			a(2) = 2 since 2 has 2 divisors, 1 and 2, and phi(1) = phi(2) = 1.
a(12) = 3 since 3 of the divisors of 12 (3, 4 and 6) have the same value of phi: phi(3) = phi(4) = phi(6) = 2.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Max[Tally[EulerPhi[Divisors[n]]][[;; , 2]]]; Array[a, 100]
  • PARI
    a(n) = vecmax(matreduce(apply(x->eulerphi(x), divisors(n)))[ , 2]);
    
  • Python
    from collections import Counter
    from sympy import divisors, totient
    def a(n):
        c = Counter(totient(d) for d in divisors(n, generator=True))
        return c.most_common(1)[0][1]
    print([a(n) for n in range(1, 88)]) # Michael S. Branicky, Jun 08 2024

Formula

a(A326835(n)) = 1.
a(A359563(n)) >= 2.
a(A359565(n)) >= 3.
a(2*n) >= 2.
a(p) = 2 for an odd prime p.
a(m*n) >= a(n) for all m > 1.
Showing 1-9 of 9 results.