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-10 of 22 results. Next

A348417 Number of coprime squares modulo A081754(n): a(n) = A046073(A081754(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 3, 5, 1, 3, 3, 9, 3, 5, 11, 1, 9, 3, 15, 5, 3, 9, 3, 21, 5, 11, 23, 21, 9, 3, 9, 29, 15, 9, 5, 33, 11, 35, 3, 9, 15, 39, 27, 41, 3, 21, 5, 11, 15, 23, 21, 15, 51, 53, 9, 9, 29, 55, 15, 9, 63, 21, 65, 5, 27, 33, 11, 69, 23, 35, 21, 75, 9, 15
Offset: 1

Views

Author

Jianing Song, Oct 18 2021

Keywords

Comments

Odd terms in A046073.

Examples

			The number of coprime squares modulo A081754(61..64) = 131, 132, 133 and 134 is 65, 5, 27 and 33 respectively, so a(61..64) = 65, 5, 27 and 33.
		

Crossrefs

Programs

  • PARI
    A046073(n) = my(z=znstar(n)); z[1]/2^(#z[2])
    up_to_lim(n) = my(v=vector(n, k, A046073(k))); select(x->(x%2), v)

A060594 Number of solutions to x^2 == 1 (mod n), that is, square roots of unity modulo n.

Original entry on oeis.org

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

Views

Author

Jud McCranie, Apr 11 2001

Keywords

Comments

Sum_{k=1..n} a(k) appears to be asymptotic to C*n*log(n) with C = 0.6... - Benoit Cloitre, Aug 19 2002
a(q) is the number of real characters modulo q. - Benoit Cloitre, Feb 02 2003
Also number of real Dirichlet characters modulo n and Sum_{k=1..n}a(k) is asymptotic to (6/Pi^2)*n*log(n). - Steven Finch, Feb 16 2006
Let P(n) be the product of the numbers less than and coprime to n. By theorem 59 in Nagell (which is Gauss's generalization of Wilson's theorem): for n > 2, P == (-1)^(a(n)/2) (mod n). - T. D. Noe, May 22 2009
Shadow transform of A005563. - Michel Marcus, Jun 06 2013
For n > 2, a(n) = 2 iff n is in A033948. - Max Alekseyev, Jan 07 2015
For n > 1, number of square numbers on the main diagonal of an (n-1) X (n-1) square array whose elements are the numbers from 1..n^2, listed in increasing order by rows. - Wesley Ivan Hurt, May 19 2021
a(n) is the number of linear Alexander quandles (Z/nZ, k) that are kei (equivalently, that have good involutions); see Ta, Prop. 5.6 and cf. A387317. - Luc Ta, Aug 26 2025

Examples

			The four numbers 1^2, 3^2, 5^2 and 7^2 are congruent to 1 modulo 8, so a(8) = 4.
		

References

  • Trygve Nagell, Introduction to Number Theory, AMS Chelsea, 1981, p. 100. [From T. D. Noe, May 22 2009]
  • Gérald Tenenbaum, Introduction à la théorie analytique et probabiliste des nombres, Cours spécialisé, 1995, Collection SMF, p. 260.
  • J. V. Uspensky and M. A. Heaslet, Elementary Number Theory, McGraw-Hill, NY, 1939, pp. 196-197.

Crossrefs

Cf. A000010, A005087, A033948, A046073, A073103 (x^4 == 1 (mod n)).
Cf. A387317.

Programs

  • Maple
    A060594 := proc(n)
       option remember;
       local a,b,c;
       if type(n,even) then
         a:= padic:-ordp(n,2);
         b:= 2^a;
         c:= n/b;
         min(b/2, 4) * procname(c)
       else
         2^nops(numtheory:-factorset(n))
       fi
    end proc:
    map(A060594, [$1 .. 100]); # Robert Israel, Jan 05 2015
  • Mathematica
    a[n_] := Sum[ Boole[ Mod[k^2 , n] == 1], {k, 1, n}]; a[1] = 1; Table[a[n], {n, 1, 103}] (* Jean-François Alcover, Oct 21 2011 *)
    a[n_] := Switch[Mod[n, 8], 2|6, 2^(PrimeNu[n]-1), 1|3|4|5|7, 2^PrimeNu[n], 0, 2^(PrimeNu[n]+1)]; Array[a, 103] (* Jean-François Alcover, Apr 09 2016 *)
  • PARI
    a(n)=sum(i=1,n,if((i^2-1)%n,0,1))
    
  • PARI
    a(n)=my(o=valuation(n,2));2^(omega(n>>o)+max(min(o-1,2),0)) \\ Charles R Greathouse IV, Jun 06 2013
    
  • PARI
    a(n)=if(n<=2, 1, 2^#znstar(n)[3] ); \\ Joerg Arndt, Jan 06 2015
    
  • Python
    from sympy import primefactors
    def a007814(n): return 1 + bin(n - 1).count('1') - bin(n).count('1')
    def a(n):
        if n%2==0:
            A=a007814(n)
            b=2**A
            c=n//b
            return min(b//2, 4)*a(c)
        else: return 2**len(primefactors(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jul 18 2017, after the Maple program
    
  • Python
    from sympy import primefactors
    def A060594(n): return (1<>(s:=(~n & n-1).bit_length()))))*(1 if n&1 else 1<Chai Wah Wu, Oct 26 2022
  • Sage
    print([len(Integers(n).square_roots_of_one()) for n in range(1,100)]) # Ralf Stephan, Mar 30 2014
    

Formula

If n == 0 (mod 8), a(n) = 2^(A005087(n) + 2); if n == 4 (mod 8), a(n) = 2^(A005087(n) + 1); otherwise a(n) = 2^(A005087(n)). - Ahmed Fares (ahmedfares(AT)my-deja.com), Apr 29 2001
a(n) = 2^omega(n)/2 if n == +/-2 (mod 8), a(n) = 2^omega(n) if n== +/-1, +/-3, 4 (mod 8), a(n) = 2*2^omega(n) if n == 0 (mod 8), where omega(n) = A001221(n). - Benoit Cloitre, Feb 02 2003
For n >= 2 A046073(n) * a(n) = A000010(n) = phi(n). This gives a formula for A046073(n) using the one in A060594(n). - Sharon Sela (sharonsela(AT)hotmail.com), Mar 09 2002
Multiplicative with a(2) = 1; a(2^2) = 2; a(2^e) = 4 for e > 2; a(q^e) = 2 for q an odd prime. - Eric M. Schmidt, Jul 09 2013
a(n) = 2^A046072(n) for n>2, in accordance with the above formulas by Ahmed Fares. - Geoffrey Critzer, Jan 05 2015
a(n) = Sum_{k=1..n} floor(sqrt(1+n*(k-1)))-floor(sqrt(n*(k-1))). - Wesley Ivan Hurt, May 19 2021
From Amiram Eldar, Dec 30 2022: (Start)
Dirichlet g.f.: (1-1/2^s+2/4^s)*zeta(s)^2/zeta(2*s).
Sum_{k=1..n} a(k) ~ (6/Pi^2)*n*(log(n) + 2*gamma - 1 - log(2)/2 - 2*zeta'(2)/zeta(2)), where gamma is Euler's constant (A001620). (End)

A046072 Decompose multiplicative group of integers modulo n 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) = m.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

The multiplicative group modulo n can be written as the direct product of a(n) (but not fewer) cyclic groups. - Joerg Arndt, Dec 25 2014
a(n) = 1 (that is, the multiplicative group modulo n is cyclic) iff n is in A033948, or equivalently iff A034380(n)=1. - Max Alekseyev, Jan 07 2015
This sequence gives the minimal number of generators of the multiplicative group of integers modulo n which is isomorphic to the Galois group Gal(Q(zeta_n)/Q), with zeta_n =exp(2*Pi*I/n). See, e.g., Theorem 9.1.11., p. 235 of the Cox reference. See also the table of the Wikipedia link. - Wolfdieter Lang, Feb 28 2017
In this factorization the trivial group C_1 = {1} is allowed as a factor only for n = 0 and 1 (otherwise one could have arbitrarily many leading C_1 factors for n >= 3). - Wolfdieter Lang, Mar 07 2017

References

  • David A. Cox, Galois Theory, John Wiley & Sons, Hoboken, New Jrsey, 2004, 235.
  • Daniel Shanks, Solved and Unsolved Problems in Number Theory, 4th ed. New York: Chelsea, pp. 92-93, 1993.

Crossrefs

Cf. A001221, A046073 (number of squares in multiplicative group modulo n), A077761, A281855, A282625 (for total factorization).
a(n)=k iff n is in: A033948 (k=1), A272592 (k=2), A272593 (k=3), A272594 (k=4), A272595 (k=5), A272596 (k=6), A272597 (k=7), A272598 (k=8), A272599 (k=9).

Programs

  • Mathematica
    f[n_] := Which[OddQ[n], PrimeNu[n], EvenQ[n] && ! IntegerQ[n/4],
      PrimeNu[n] - 1, IntegerQ[n/4] && ! IntegerQ[n/8], PrimeNu[n],
      IntegerQ[n/8], PrimeNu[n] + 1]; Join[{1, 1},
    Table[f[n], {n, 3, 102}]] (* Geoffrey Critzer, Dec 24 2014 *)
  • PARI
    a(n)=if(n<=2, 1, #znstar(n)[3]); \\ Joerg Arndt, Aug 26 2014

Formula

a(n) = A001221(n) - 1 if n > 2 is divisible by 2 and not by 4, a(n) = A001221(n) + 1 if n is divisible by 8, a(n) = A001221(n) in other cases. - Ivan Neretin, Aug 01 2016
Sum_{k=1..n} a(k) = n * (log(log(n)) + B - 1/8) + O(n/log(n)), where B is Mertens's constant (A077761). - Amiram Eldar, Sep 21 2024

A293482 The number of 5th powers in the multiplicative group modulo n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 2, 4, 12, 6, 8, 8, 16, 6, 18, 8, 12, 2, 22, 8, 4, 12, 18, 12, 28, 8, 6, 16, 4, 16, 24, 12, 36, 18, 24, 16, 8, 12, 42, 4, 24, 22, 46, 16, 42, 4, 32, 24, 52, 18, 8, 24, 36, 28, 58, 16, 12, 6, 36, 32, 48, 4, 66, 32, 44, 24, 14, 24, 72, 36, 8, 36, 12, 24, 78, 32, 54, 8, 82, 24
Offset: 1

Views

Author

R. J. Mathar, Oct 10 2017

Keywords

Comments

The size of the set of numbers j^5 mod n, gcd(j,n)=1, 1 <= j <= n.
A000010(n) / a(n) is another multiplicative integer sequence.

Crossrefs

The number of k-th powers in the multiplicative group modulo n: A046073 (k=2), A087692 (k=3), A250207 (k=4), this sequence (k=5), A293483 (k=6), A293484 (k=7), A293485 (k=8).

Programs

  • Maple
    A293482 := proc(n)
        local r,j;
        r := {} ;
        for j from 1 to n do
            if igcd(j,n)= 1 then
                r := r union { modp(j &^ 5,n) } ;
            end if;
        end do:
        nops(r) ;
    end proc:
    seq(A293482(n),n=1..120) ;
  • Mathematica
    a[n_] := Module[{r, j}, r = {}; For[j = 1, j <= n, j++, If[GCD[j, n] == 1, r = r ~Union~ {PowerMod[j, 5, n]}] ]; Length[r]];
    Table[a[n], {n, 1, 120}] (* Jean-François Alcover, Feb 14 2023, after R. J. Mathar *)
    f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 5] == 1, 5, 1]; f[2, e_] := 2^(e - 1); f[2, 1] = 1; f[5, e_] := 4*5^(e-2); f[5, 1] = 4; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)

Formula

Conjecture: a(2^e) = 1 for e <= 1; a(2^e) = 2^(e-1) for e >= 1; a(5)=4; a(5^e) = 4*5^(e-2) for e > 1; a(p^e) = (p-1)*p^(e-1) for p == {2,3,4} (mod 5); a(p^e) = (p-1)*p^(e-1)/5 for p == 1 (mod 5). - R. J. Mathar, Oct 13 2017
a(n) = A000010(n)/A319099(n). This implies that the conjecture above is true. - Jianing Song, Nov 10 2019

A102476 Least modulus with 2^n square roots of 1.

Original entry on oeis.org

1, 3, 8, 24, 120, 840, 9240, 120120, 2042040, 38798760, 892371480, 25878772920, 802241960520, 29682952539240, 1217001054108840, 52331045326680120, 2459559130353965640, 130356633908760178920, 7691041400616850556280
Offset: 0

Views

Author

David W. Wilson, Jan 10 2005

Keywords

Comments

The number of square roots of 1 in any modulus is a power of 2.
Another way of expressing the same: These are also the record setting values of m for the number of solutions to "m*k+1 is a square", for some k, 0<=k<=m. There is 1 solution for a(0)=m=1, and for m = a(n), n>0, there is the first occurrence of 2^n solutions. Compare with A006278. - Richard R. Forberg, Mar 18 2016
Also a(n) is the least k such that the proportion of squares in a reduced residue system modulo n is 1/2^n, i.e. A046073(k)/A000010(k) = 1/2^n. - Jianing Song, Nov 12 2019
From Jianing Song, Oct 18 2021: (Start)
a(n) is the smallest k such that rank((Z/kZ)*) = n. The rank of a finitely generated group rank(G) is defined to be the size of the minimal generating sets of G. In particular, rank((Z/kZ)*) = 0 if k <= 2 and A046072(k) otherwise.
The number of coprime squares modulo a(n) is given by A046073(a(n)) = A323739(n-1) for n >= 2. (End)

Examples

			a(3) = 24 because 24 is the least modulus with 2^3 square roots of 1, namely 1,5,7,11,13,17,19,23.
		

Crossrefs

Programs

  • Mathematica
    {1, 3}~Join~Table[4 Product[Prime[k], {k, n}], {n, 17}] (* Michael De Vlieger, Mar 27 2016 *)
    nxt[{a_, p_}] := {a*NextPrime[p], NextPrime[p]}; Join[{1,3},NestList[nxt,{8,2},20][[All,1]]] (* or *) Join[{1,3},4*FoldList[ Times, Prime[ Range[ 21]]]](* Harvey P. Dale, Dec 18 2016 *)
  • PARI
    a(n) = if(n<=1, [1,3][n+1], 4*factorback(primes(n-1))) \\ Jianing Song, Oct 19 2021, following David A. Corneth's program for A002110

Formula

a(n) = 4(prime(n-1))# = 4*A002110(n-1) for n >= 2. Least k with A060594(k) = 2^n.

A087692 Number of cubes in multiplicative group modulo n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 2, 4, 2, 4, 10, 4, 4, 2, 8, 8, 16, 2, 6, 8, 4, 10, 22, 8, 20, 4, 6, 4, 28, 8, 10, 16, 20, 16, 8, 4, 12, 6, 8, 16, 40, 4, 14, 20, 8, 22, 46, 16, 14, 20, 32, 8, 52, 6, 40, 8, 12, 28, 58, 16, 20, 10, 4, 32, 16, 20, 22, 32, 44, 8, 70, 8, 24, 12, 40, 12, 20, 8, 26, 32, 18, 40
Offset: 1

Views

Author

Yuval Dekel (dekelyuval(AT)hotmail.com), Sep 27 2003

Keywords

Comments

Cubic analog of A046073. - Steven Finch, Mar 01 2006

Crossrefs

Cf. A000010, A060839, A046073 (squares), A250207 (4th powers).

Programs

  • Maple
    b:= proc(p,i)
      if p = 3 then if i=1 then 2 else 2*3^(i-2) fi
      elif p mod 6 = 1 then (p-1)*p^(i-1)/3
      else (p-1)*p^(i-1)
      fi
    end proc:
    seq(mul(b(f[1],f[2]), f = ifactors(n)[2]), n = 1 .. 1000); # Robert Israel, Jan 04 2015
  • Mathematica
    Map[Length,Table[Select[Range[n],CoprimeQ[#, n] && IntegerQ[PowerMod[#, 1/3, n]] &], {n, 1, 82}]] (* Geoffrey Critzer, Jan 07 2015 *)
    f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 6] == 1, 3, 1]; f[3, e_] := 2*3^(e-2); f[3, 1] = 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)
  • PARI
    a(n) = my(f = factor(n)); prod(j=1, #f~, p=f[j,1]; k=f[j,2]; if (p == 3, if (k==1, 2, 2*3^(k-2)), if ((p % 6) == 1, ((p-1)*p^(k-1))/3, (p-1)*p^(k-1)))); \\ Michel Marcus, Jan 05 2015

Formula

a(n) = phi(n) / A060839(n).
Multiplicative with a(3) = 2, a(3^k) = 2*3^(k-2) otherwise;
a(p^k) = (p-1)*p^(k-1)/3 if prime p == 1 mod 6; a(p^k) = (p-1)*p^(k-1) for all other primes p. - Robert Israel, Jan 04 2015
Sum_{k=1..n} a(k) ~ c * n^2/log(n)^(1/3), where c = (17/(36*Gamma(2/3))) * Product_{p = 3 or p prime == 2 (mod 3)} (1+1/*p)*(1-1/p)^(2/3) * Product_{p prime == 1 (mod 3)} (1+1/(3*p))*(1-1/p)^(2/3) = 0.33051128776333262024... (Finch and Sebah, 2006). - Amiram Eldar, Oct 18 2022

Extensions

More terms from Steven Finch, Mar 01 2006

A250207 The number of quartic terms in the multiplicative group modulo n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 5, 1, 3, 3, 1, 1, 4, 3, 9, 1, 3, 5, 11, 1, 5, 3, 9, 3, 7, 1, 15, 2, 5, 4, 3, 3, 9, 9, 3, 1, 10, 3, 21, 5, 3, 11, 23, 1, 21, 5, 4, 3, 13, 9, 5, 3, 9, 7, 29, 1, 15, 15, 9, 4, 3, 5, 33, 4, 11, 3, 35, 3, 18, 9, 5, 9, 15, 3, 39, 1
Offset: 1

Views

Author

R. J. Mathar, Mar 02 2015

Keywords

Comments

In the character table of the multiplicative group modulo n there are phi(n) different characters. [This is made explicit for example by the number of rows in arXiv:1008.2547.] The set of the fourth powers of the characters in all representations has some cardinality, which defines the sequence.

Examples

			For n <= 6, the set of all characters in all representations consists of a subset of +1, -1, +i or -i. Their fourth powers are all +1, a single value, so a(n)=1 then.
For n=7, the set of characters is 1, -1, +-1/2 +- sqrt(3)*i/2, so their fourth powers are 1 or -1/2 +- sqrt(3)*i/2, which are three different values, so a(7)=3.
For n=11, the fourth powers of the characters may be 1, exp(+-2*i*Pi/5) or exp(+-4*i*Pi/5), which are 5 different values.
		

Crossrefs

Programs

  • Maple
    A250207 := proc(n)
        numtheory[phi](n)/A073103(n) ;
    end proc:
  • Mathematica
    a[n_] := EulerPhi[n]/Count[Range[0, n-1]^4 - 1, k_ /; Divisible[k, n]];
    Array[a, 80] (* Jean-François Alcover, Nov 20 2017 *)
    f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 4] == 1, 4, 2]; f[2, e_] := If[e <= 3, 1, 2^(e - 4)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)
  • PARI
    a(n)=my(f=factor(n)); prod(i=1,#f~, if(f[i,1]==2, 2^max(0,f[i,2]-4), f[i,1]^(f[i,2]-1)*(f[i,1]-1)/if(f[i,1]%4==1,4,2))) \\ Charles R Greathouse IV, Mar 02 2015

Formula

a(n) = A000010(n)/A073103(n).
Multiplicative with a(2^e) = 1 for e<=3; a(2^e) = 2^(e-4) for e>=4; a(p^e) = p^(e-1)*(p-1)/4 for e>=1 and p == 1 (mod 4); a(p^e) = p^(e-1)*(p-1)/2 for e>=1 and p == 3 (mod 4). (Derived from A073103.) - R. J. Mathar, Oct 13 2017

A293483 The number of 6th powers in the multiplicative group modulo n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 5, 1, 2, 1, 2, 2, 8, 1, 3, 2, 1, 5, 11, 1, 10, 2, 3, 1, 14, 2, 5, 4, 5, 8, 2, 1, 6, 3, 2, 2, 20, 1, 7, 5, 2, 11, 23, 2, 7, 10, 8, 2, 26, 3, 10, 1, 3, 14, 29, 2, 10, 5, 1, 8, 4, 5, 11, 8, 11, 2, 35, 1, 12, 6, 10, 3, 5, 2, 13, 4, 9, 20
Offset: 1

Views

Author

R. J. Mathar, Oct 10 2017

Keywords

Comments

The size of the set of numbers j^6 mod n, gcd(j,n)=1, 1 <= j <= n.
A000010(n) / a(n) is another multiplicative integer sequence.

Crossrefs

The number of k-th powers in the multiplicative group modulo n: A046073 (k=2), A087692 (k=3), A250207 (k=4), A293482 (k=5), this sequence (k=6), A293484 (k=7), A293485 (k=8).

Programs

  • Maple
    A293483 := proc(n)
        local r,j;
        r := {} ;
        for j from 1 to n do
            if igcd(j,n)= 1 then
                r := r union { modp(j &^ 6,n) } ;
            end if;
        end do:
        nops(r) ;
    end proc:
    seq(A293483(n),n=1..120) ;
  • Mathematica
    a[n_] := EulerPhi[n]/Count[Range[0, n - 1]^6 - 1, k_ /; Divisible[k, n]];
    Array[a, 100] (* Jean-François Alcover, May 24 2023 *)
    f[p_, e_] := (p - 1)*p^(e - 1)/If[Mod[p, 6] == 1, 6, 2]; f[2, e_] := If[e <= 3, 1, 2^(e - 3)]; f[3, e_] := If[e <= 2, 1, 3^(e - 2)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)

Formula

Conjecture: a(2^e) = 1 for e <= 3; a(2^e) = 2^(e-3) for e >= 3; a(3^e) = 1 for e <= 2; a(3^e) = 3^(e-2) for e >= 2; a(p^e) = (p-1)*p^(e-1)/2 for p == 5 (mod 6); a(p^e) = (p-1)*p^(e-1)/6 for p == 1 (mod 6). - R. J. Mathar, Oct 13 2017
a(n) = A000010(n)/A319100(n). This implies that the conjecture above is true. - Jianing Song, Nov 10 2019

A293484 The number of 7th powers in the multiplicative group modulo n.

Original entry on oeis.org

1, 1, 2, 2, 4, 2, 6, 4, 6, 4, 10, 4, 12, 6, 8, 8, 16, 6, 18, 8, 12, 10, 22, 8, 20, 12, 18, 12, 4, 8, 30, 16, 20, 16, 24, 12, 36, 18, 24, 16, 40, 12, 6, 20, 24, 22, 46, 16, 6, 20, 32, 24, 52, 18, 40, 24, 36, 4, 58, 16, 60, 30, 36, 32, 48, 20, 66, 32, 44, 24, 10, 24, 72, 36, 40, 36
Offset: 1

Views

Author

R. J. Mathar, Oct 10 2017

Keywords

Comments

The size of the set of numbers j^7 mod n, gcd(j,n)=1, 1 <= j <= n.
A000010(n) / a(n) is another multiplicative integer sequence (size of the kernel of the isomorphism of the multiplicative group modulo n to the multiplicative group of 7th powers modulo n).

Crossrefs

The number of k-th powers in the multiplicative group modulo n: A046073 (k=2), A087692 (k=3), A250207 (k=4), A293482 (k=5), A293483 (k=6), this sequence (k=7), A293485 (k=8).

Programs

  • Maple
    A293484 := proc(n)
        local r,j;
        r := {} ;
        for j from 1 to n do
            if igcd(j,n)= 1 then
                r := r union { modp(j &^ 7,n) } ;
            end if;
        end do:
        nops(r) ;
    end proc:
    seq(A293484(n),n=1..120) ;
  • Mathematica
    a[n_] := EulerPhi[n]/Count[Range[0, n - 1]^7 - 1, k_ /; Divisible[k, n]];
    Array[a, 100] (* Jean-François Alcover, May 24 2023 *)
    f[p_, e_] := (p-1)*p^(e-1)/If[Mod[p, 7] == 1, 7, 1]; f[2, e_] := 2^(e-1); f[7, 1] = 6; f[7, e_] := 6*7^(e-2); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)

Formula

Conjecture: a(2^e) = 1 for e <= 1; a(2^e) = 2^(e-1) for e >= 1; a(7^e) = 6 for e=1; a(7^e) = 6*7^(e-2) for e >= 2; a(p^e) = (p-1)*p^(e-1) for p == {2,3,4,5,6} (mod 7); a(p^e) = (p-1)*p^(e-1)/7 for p == 1 (mod 7). - R. J. Mathar, Oct 13 2017
a(n) = A000010(n)/A319101(n). This implies that the conjecture above is true. - Jianing Song, Nov 10 2019

A293485 The number of 8th powers in the multiplicative group modulo n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 5, 1, 3, 3, 1, 1, 2, 3, 9, 1, 3, 5, 11, 1, 5, 3, 9, 3, 7, 1, 15, 1, 5, 2, 3, 3, 9, 9, 3, 1, 5, 3, 21, 5, 3, 11, 23, 1, 21, 5, 2, 3, 13, 9, 5, 3, 9, 7, 29, 1, 15, 15, 9, 2, 3, 5, 33, 2, 11, 3, 35, 3, 9, 9, 5, 9, 15, 3, 39, 1, 27, 5, 41, 3, 2
Offset: 1

Views

Author

R. J. Mathar, Oct 10 2017

Keywords

Comments

The size of the set of numbers j^8 mod n, gcd(j,n)=1, 1<=j<=n.

Crossrefs

The number of k-th powers in the multiplicative group modulo n: A046073 (k=2), A087692 (k=3), A250207 (k=4), A293482 (k=5), A293483 (k=6), A293484 (k=7), this sequence (k=8).
Cf. A085311, A247257 (order of the kernel isomorphism of Z/nZ to this group), A000010.

Programs

  • Maple
    A293485 := proc(n)
        local r,j;
        r := {} ;
        for j from 1 to n do
            if igcd(j,n)= 1 then
                r := r union { modp(j &^ 8,n) } ;
            end if;
        end do:
        nops(r) ;
    end proc:
    seq(A293485(n),n=1..120) ;
  • Mathematica
    a[n_] := EulerPhi[n]/Count[Range[0, n - 1]^8 - 1, k_ /; Divisible[k, n]];
    Array[a, 100] (* Jean-François Alcover, May 24 2023 *)
    f[p_, e_] := (p - 1)*p^(e - 1)/Switch[Mod[p, 8], 1, 8, 5, 4, , 2]; f[2, e] := If[e <= 4, 1, 2^(e - 5)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Aug 10 2023 *)
  • PARI
    \\ The following two functions by Charles R Greathouse IV, from A247257:
    g(p, e) = if(p==2, 2^min(e-1, 4), if(p%4==3, 2, if(p%8==5, 4, 8)));
    A247257(n) = my(f=factor(n)); prod(i=1, #f~, g(f[i, 1], f[i, 2]));
    A293485(n) = (eulerphi(n)/A247257(n)); \\ Antti Karttunen, Dec 05 2017

Formula

A000010(n) / a(n) = A247257(n).
Multiplicative with a(2^e) = 1 for e<=4, a(2^e) = 2^(e-5) for e>=5; a(p^e) = (p-1)*p^(e-1)/8 for p == 1 (mod 8); a(p^e) = (p-1)*p^(e-1)/4 for p == 5 (mod 8); a(p^e) = (p-1)*p^(e-1)/2 for p == {3,7} (mod 8). - R. J. Mathar, Oct 15 2017 [corrected by Georg Fischer, Jul 21 2022]
Showing 1-10 of 22 results. Next