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

A111725 Number of residues modulo n of the maximum order.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 3, 2, 2, 4, 3, 4, 2, 4, 4, 8, 2, 6, 4, 6, 4, 10, 7, 8, 4, 6, 6, 12, 4, 8, 8, 12, 8, 8, 6, 12, 6, 8, 8, 16, 6, 12, 12, 8, 10, 22, 8, 12, 8, 16, 8, 24, 6, 16, 14, 18, 12, 28, 8, 16, 8, 24, 16, 24, 12, 20, 16, 30, 8, 24, 14, 24, 12, 16, 18, 24, 8, 24, 24, 18, 16, 40, 14, 32, 12
Offset: 1

Views

Author

Max Alekseyev, Nov 18 2005

Keywords

Comments

The maximum order modulo n is given by A002322(n).
a(n) is the number of primitive lambda-roots of n. - Michel Marcus, Mar 17 2016
A primitive lambda-root is an element of maximal order modulo n. - Joerg Arndt, Mar 19 2016
a(n) is odd if and only if n is a factor of 24, i.e., n is in A018253. - Jianing Song, Apr 27 2019

Crossrefs

Programs

  • Maple
    LiDelta := proc(q,n)
        local a,p,e,lam,v ;
        a := 0 ;
        lam := numtheory[lambda](n) ;
        for p in numtheory[factorset](n) do
            e := padic[ordp](n,p) ;
            if p =2 and e= 3 and q =2 and padic[ordp](lam,q) = 1 then
                return A083399(n) ;
            elif isprime(q) then
                v := padic[ordp](lam,q) ;
                if modp( numtheory[lambda](p^e),q^v) = 0 then
                    a := a+1 ;
                end if;
            end if:
        end do:
        a ;
    end proc:
    A111725 := proc(n)
        local a,q ;
        a := 1;
        for q in numtheory[factorset](numtheory[lambda](n)) do
            a := a*(1-1/q^LiDelta(q,n)) ;
        end do:
        a*numtheory[phi](n) ;
    end proc:
    seq(A111725(n),n=1..30) ; # R. J. Mathar, Sep 29 2017
  • Mathematica
    f[list_]:=Count[list,Max[list]];Map[f,Table[Table[MultiplicativeOrder[k,n],{k,Select[Range[n],GCD[#,n]==1&]}],{n,1,100}]]  (* Geoffrey Critzer, Jan 26 2013 *)
  • PARI
    { a(n) = my(r, c, r1); r=1; c=0; for(k=0, n-1, if(gcd(k, n)!=1, next); r1=znorder(Mod(k,n)); if(r1==r, c++); if(r1>r, r=r1; c=1) ); c; }
    
  • PARI
    { A111725(n) = if(n<3,return(1)); my(k,p); k=znstar(n)[2]; p=factor(k[1])[,1]; eulerphi(n) * prod(i=1,#p, (1-1/p[i]^vecsum(apply(x->valuation(k[1]\x,p[i])==0,k))) ); } \\ Max Alekseyev, Oct 23 2021

Formula

For prime n, a(n) = phi(phi(n)) = A010554(n) = phi(n-1). - Nick Hobson, Jan 09 2007
Decompose (Z/nZ)* as a product of cyclic groups C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j, then a(n) = Sum_{d divides psi(n)} (mu(psi(n)/d)*Product{i=1..m} gcd(d, k_i)). This is an immediate corollary from the fact that the number of elements in (Z/nZ)* such that x^d == 1 (mod n) is Product{i=1..m} gcd(d, k_i). Here (Z/nZ)* is the multiplicative group of integers modulo n, psi(n) = A002322(n) and mu(n) = A008683(n). - Jianing Song, Apr 27 2019
From Jianing Song, Oct 12 2021: (Start)
Decompose (Z/nZ)* as a product of cyclic groups C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j, then a(n) = phi(n) * Product_{p prime dividing phi(n)} (1 - 1/p^r(p)), where r(p) is the number of j such that v(k_j,p) = v(k_m,p), v(s,p) is the p-adic valuation of s.
Proof: let G = (Z/nZ)*, G_p be the Sylow p-subgroup of G, then G = Product_{p prime dividing phi(n)} G_p: every element x can be uniquely written as Product_{p prime dividing phi(n)} x_p for x_p in G_p. Let ord(x) be the order of x. Since ord(x_p, x_p') = 1 for distinct p and p', we have ord(x) = Product_{p prime dividing phi(n)} ord(x_p), hence x is of maximal order if and only if each x_p is of maximal order in G_p.
Each G_p is isomorphic to C_{p^(e_1)} x C_{p^(e_2)} x ... x C_{p^(e_m)} for e_1 <= e_2 <= ... <= e_m, e_m > 0. Write x_p = (x_{p,1}, x_{p,2}, ..., x_{p,m}). Suppose that e_m = e_{m-1} = ... = e_{m-r+1} > e_{m-r}, then x_p is of maximal order in G_p if and only of x_{p,j} is of order p^(e_m) for some m-r+1 <= j <= m, so the number of such x_p is p^(e_1) * p^(e_2) * ... * p^(e_{m-r}) * (p^(r*e_m) - p^(r*((e_m)-1))) = |G_p| * (1 - 1/p^r).
An example: n = 15903, then (Z/nZ)* = C_6 x C_18 x C_90. We can see that r(2) = 3, r(3) = 2 and r(5) = 1, so a(15903) = phi(15903) * (1 - 1/2^3) * (1 - 1/3^2) * (1 - 1/5^1) = 6048.
It should be clear that a(n) = phi(phi(n)) if and only if r(p) = 1 for every prime p dividing phi(n), or v(k_{m-1},p) < v(k_m,p) for every prime p dividing phi(n). Otherwise, a(n) > phi(phi(n)). (End)

A300064 Numbers k such that there are exactly phi(phi(k)) residues modulo k of the maximum order.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 25, 26, 27, 29, 30, 31, 32, 34, 35, 37, 38, 39, 40, 41, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 58, 59, 60, 61, 62, 64, 67, 68, 70, 71, 73, 74, 75, 78, 79, 81, 82, 83, 85, 86, 87, 89, 90, 94, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 106, 107, 109, 110
Offset: 1

Views

Author

Max Alekseyev, Feb 23 2018

Keywords

Comments

Numbers k such that A111725(k) = A010554(k).
Contains subsequences of the primes (A000040) and the prime powers (A000961) except 2^3 = 8.
The ratio a(n)/n tends to infinity as n grows (Müller and Schlage-Puchta, 2004).
Decompose (Z/kZ)* as a product of cyclic groups C_{k_1} x C_{k_2} x ... x C_{k_m}, where k_i divides k_j for i < j, then k is a term if and only if m <= 1, or v(k_{m-1},p) < v(k_m,p) holds for all primes p dividing k_m = psi(k), where v(s,p) is the p-adic valuation of s. Otherwise, there are more than phi(phi(k)) residues modulo k of the maximum order. See my Oct 12 2021 formula for A111725 for a proof. - Jianing Song, Oct 20 2021

Crossrefs

Complement of A300065.
Set union of A300079 and A000040.
Set union of A300080 and A000961 \ {8}.

Programs

  • Mathematica
    q[n_] := Count[(t = Table[MultiplicativeOrder[k, n], {k, Select[Range[n], CoprimeQ[n, #] &]}]), Max[t]] == EulerPhi[EulerPhi[n]]; Select[Range[100], q] (* Amiram Eldar, Oct 12 2021 *)
  • PARI
    isA300064(n) = my(v=znstar(n)[2], l=#v); if(l<2, return(1), my(U=v[1], L=v[2], d=factor(U), w=omega(U)); for(i=1, w, if(valuation(L,d[i,1]) == d[i,2], return(0))); return(1)) \\ Jianing Song, Oct 20 2021

A300079 Composite numbers k such that there are exactly phi(phi(k)) residues modulo k of the maximum order.

Original entry on oeis.org

4, 6, 9, 10, 14, 15, 16, 18, 20, 22, 25, 26, 27, 30, 32, 34, 35, 38, 39, 40, 45, 46, 48, 49, 50, 51, 52, 54, 55, 58, 60, 62, 64, 68, 70, 74, 75, 78, 81, 82, 85, 86, 87, 90, 94, 95, 96, 98, 100, 102, 104, 105, 106, 110, 111, 112, 115, 116, 118, 119, 120, 121, 122, 123, 125, 128, 134, 135, 136, 140, 142, 143, 144, 146, 148, 150, 153
Offset: 1

Views

Author

Max Alekseyev, Feb 24 2018

Keywords

Comments

Composite numbers k such that A111725(k) = A010554(k).
Contains as a subsequence the nontrivial prime powers (A246547) except 2^3 = 8.

Crossrefs

Subsequence of A300064.
Set difference of A002808 and A300065.
Contains A300080 as a subsequence.

Programs

  • Mathematica
    q[n_] := Count[(t = Table[MultiplicativeOrder[k, n], {k, Select[Range[n], CoprimeQ[n, #] &]}]), Max[t]] == EulerPhi[EulerPhi[n]]; Select[Range[150], CompositeQ[#] && q[#] &] (* Amiram Eldar, Oct 12 2021 *)

A300080 Numbers k that are not prime powers, and have exactly phi(phi(k)) residues modulo k of the maximum order.

Original entry on oeis.org

6, 10, 14, 15, 18, 20, 22, 26, 30, 34, 35, 38, 39, 40, 45, 46, 48, 50, 51, 52, 54, 55, 58, 60, 62, 68, 70, 74, 75, 78, 82, 85, 86, 87, 90, 94, 95, 96, 98, 100, 102, 104, 105, 106, 110, 111, 112, 115, 116, 118, 119, 120, 122, 123, 134, 135, 136, 140, 142, 143, 144, 146, 148, 150, 153, 155, 156, 158, 159, 160, 162, 164, 165, 166
Offset: 1

Views

Author

Max Alekseyev, Feb 24 2018

Keywords

Comments

Numbers k with at least two distinct prime factors (A024619) such that A111725(k) = A010554(k).

Crossrefs

Set difference of: A300064 and A000961, A300079 and A246547, A024619 and A300065.

Programs

  • Mathematica
    q[n_] := Count[(t = Table[MultiplicativeOrder[k, n], {k, Select[Range[n], CoprimeQ[n, #] &]}]), Max[t]] == EulerPhi[EulerPhi[n]]; Select[Range[200], PrimeNu[#] > 1 && q[#] &] (* Amiram Eldar, Oct 12 2021 *)
Showing 1-4 of 4 results.