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

A160498 Number of cubic primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0
Offset: 1

Views

Author

Steven Finch, May 15 2009

Keywords

Comments

Also called primitive Dirichlet characters of order 3.
Mobius transform of A060839.
C. David, J. Fearnley & H. Kisilevsky prove that Sum_{k=1..n} a(k) ~ C*n, with C = (11*sqrt(3)/(18*Pi)) * Product_{primes p == 1 (mod 3)} (1 - 2/(p*(p+1))) = 0.3170565167922841205670156...; they credit Cohen, F. Diaz y Diaz, & M. Olivier 2002 (see Proposition 5.2. and Corollary 5.3.). - Charles R Greathouse IV, Aug 26 2009 [corrected by Vaclav Kotesovec, Sep 16 2020]
a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a cubic root of unity: 1, w = (-1 + sqrt(3)*i)/2 or w^2 = (-1 - sqrt(3)*i)/2. - Jianing Song, Feb 27 2019
Every term is 0 or a power of 2. - Jianing Song, Mar 02 2019
From Jianing Song, Apr 03 2021: (Start)
For n >= 2, a(n) is the number of cyclic cubic fields with discriminant n^2. See A343023 for detailed information.
The first occurrence of 2^t is 9*A121940(t-1) for t >= 2. (End)

Examples

			From _Jianing Song_, Mar 02 2019: (Start)
Let w = (-1 + sqrt(3)*i)/2 be one of the primitive 3rd root of unity.
For n = 7, the 2 cubic primitive Dirichlet characters modulo n are [0, 1, w, w^2, w^2, w, 1] and [0, 1, w^2, w, w, w^2, 1], so a(7) = 2.
For n = 9, the 2 cubic primitive Dirichlet characters modulo n are [0, 1, w, 0, w^2, w^2, 0, w, 1] and [0, 1, w^2, 0, w, w, 0, w^2, 1], so a(9) = 2. (End)
		

Crossrefs

Cf. A114643 (number of quadratic primitive Dirichlet characters modulo n), A160499 (number of quartic primitive Dirichlet characters modulo n).
Cf. A060839 (number of solutions to x^3 == 1 (mod n)).

Programs

  • Mathematica
    A060839[n_] := Sum[If[Mod[k^3 - 1, n] == 0, 1, 0], {k, 1, n}]; a[n_] := Sum[ MoebiusMu[n/d]*A060839[d], {d, Divisors[n]}]; Table[a[n], {n, 2, 81}] (* Jean-François Alcover, Jun 19 2013 *)
    f[3, 2] = 2; f[p_, e_] := If[Mod[p, 3] == 1 && e == 1, 2, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)=sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^3-1)%d, 0, 1)), 0)) \\ Steven Finch, Jun 09 2009
    
  • PARI
    A005088(n)=my(f=factor(n)[,1]); sum(i=1,#f,f[i]%3==1)
    A060839(n)=3^((n%9==0)+A005088(n))
    a(n)=sumdiv(n,d,moebius(n/d)*A060839(d)) \\ Charles R Greathouse IV, Aug 26 2009
    
  • PARI
    a(n) = my(L=factor(n), w=omega(n)); for(i=1, w, if(!((L[i, 1]%3==1 && L[i, 2]==1) || L[i, 1]^L[i, 2] == 9), return(0))); 2^w \\ Jianing Song, Apr 03 2021

Formula

Multiplicative with a(p^e) = 2 if p^e = 9 or p == 1 (mod 3) and e = 1, otherwise 0. - Jianing Song, Mar 02 2019
a(n) = 2*A343023(n) for n >= 2. - Jianing Song, Apr 03 2021

Extensions

a(1) = 1 prepended by Jianing Song, Feb 27 2019

A160499 Number of quartic primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 1, 1, 3, 0, 1, 2, 0, 0, 1, 1, 3, 0, 3, 4, 3, 0, 1, 3, 1, 0, 1, 2, 0, 0, 0, 1, 3, 0, 1, 0, 1, 0, 3, 0, 3, 0, 3, 6, 3, 0, 1, 1, 0, 0, 1, 4, 0, 0, 3, 3, 3, 0, 3, 2, 1, 0, 1, 3, 3, 0, 0, 0, 9, 0, 1, 3, 1, 0, 1, 0, 3, 0, 0, 1, 1, 0, 1, 12, 0
Offset: 1

Views

Author

Steven Finch, May 15 2009

Keywords

Comments

Also called biquadratic primitive Dirichlet characters.
Primitive Dirichlet characters of both order 2 & order 4 are included.
a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a fourth-power root of unity (1, i, -1 and -i). - Jianing Song, Feb 27 2019
Mobius transform of A073103. - Jianing Song, Mar 02 2019

Examples

			From _Jianing Song_, Mar 02 2019: (Start)
For n = 5, the 3 quartic primitive Dirichlet characters modulo n are [0, 1, -1, -1, 1], [0, 1, i, -i, -1] and [0, 1, -i, i, -1], so a(5) = 3.
For n = 16, the 4 quartic primitive Dirichlet characters modulo n are [0, 1, 0, i, 0, i, 0, 1, 0, -1, 0, -i, 0, -i, 0, -1], [0, 1, 0, -i, 0, -i, 0, 1, 0, -1, 0, i, 0, i, 0, -1], [0, 1, 0, i, 0, -i, 0, -1, 0, -1, 0, -i, 0, i, 0, 1] and [0, 1, 0, -i, 0, i, 0, -1, 0, -1, 0, i, 0, -i, 0, 1], so a(16) = 4. (End)
		

Crossrefs

Cf. A114643 (number of quadratic primitive Dirichlet characters modulo n), A160498 (number of cubic primitive Dirichlet characters modulo n).
Cf. A073103 (number of solutions to x^4 == 1 (mod n)).
Cf. A064533.

Programs

  • Mathematica
    f[n_] := Sum[If[Mod[k^4 - 1, n] == 0, 1, 0], {k, 1, n}]; a[n_] := Sum[ MoebiusMu[n/d]*f[d], {d, Divisors[n]}]; Table[a[n], {n, 2, 81}] (* Jean-François Alcover, Jun 19 2013 *)
    f[2, e_] := Which[e == 1, 0, e == 2, 1, e == 3, 2, e == 4, 4, e >= 5, 0]; f[p_, 1] := If[Mod[p, 4] == 1, 3, 1]; f[p_, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)=sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^4-1)%d, 0, 1)), 0)) \\ Steven Finch, Jun 09 2009

Formula

Multiplicative with a(4) = 1, a(8) = 2, a(16) = 4, a(2^e) = 0 for e = 1 or e >= 5; for odd primes p, a(p) = 3 if p == 1 (mod 4) and 1 if p == 3 (mod 4), a(p^e) = 0 for e >= 2. - Jianing Song, Mar 02 2019
Sum_{k=1..n} a(k) ~ c * n * log(n), where c = (7/(16*Pi*K^2)) * Product_{primes p == 1 (mod 4)} (1 - (5*p-3)/(p^2*(p+1))) = 0.1908767211685284480112237..., and K is the Landau-Ramanujan constant (A064533). - Amiram Eldar, Sep 16 2020

Extensions

a(1) = 1 prepended by Jianing Song, Feb 27 2019

A307380 Number of quintic primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0
Offset: 1

Views

Author

Jianing Song, Apr 06 2019

Keywords

Comments

a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a fifth-power root of unity.
Mobius transform of A319099. Every term is 0 or a power of 4.

Examples

			Let w = exp(2*Pi/5). For n = 11, the 4 quintic primitive Dirichlet characters modulo n are:
  Chi_1 = [0, 1, w, w^3, w^2, w^4, w^4, w^2, w^3, w, 1];
  Chi_2 = [0, 1, w^2, w, w^4, w^3, w^3, w^4, w, w^2, 1];
  Chi_3 = [0, 1, w^3, w^4, w, w^2, w^2, w, w^4, w^3, 1];
  Chi_4 = [0, 1, w^4, w^2, w^3, w, w, w^3, w^2, w^4, 1],
so a(11) = 4.
		

Crossrefs

Number of k-th power primitive Dirichlet characters modulo n: A114643 (k=2), A160498 (k=3), A160499 (k=4), this sequence (k=5), A307381 (k=6), A307382 (k=7), A329272 (k=8).
Cf. A319099 (number of solutions to x^5 == 1 (mod n)).

Programs

  • Mathematica
    f[5, 2] = 4; f[p_, e_] := If[Mod[p, 5] == 1 && e == 1, 4, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)=sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^5-1)%d, 0, 1)), 0))
    
  • PARI
    A307380(n) = sumdiv(n, d, moebius(n/d)*sum(i=1, d, if((i^5-1)%d, 0, 1))); \\ (Slightly speeding the program above) - Antti Karttunen, Aug 22 2019
    
  • PARI
    A307380(n) = { my(f=factor(n)); prod(i=1, #f~, if(((5==f[i,1])&&(2==f[i,2]))||((1==(f[i,1]%5))&&(1==f[i,2])),4,0)); }; \\ (After the multiplicative formula, much faster) - Antti Karttunen, Aug 22 2019

Formula

Multiplicative with a(p^e) = 4 if p^e = 25 or p == 1 (mod 5) and e = 1, otherwise 0.

Extensions

More terms from Antti Karttunen, Aug 22 2019

A307381 Number of sextic primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 1, 1, 1, 0, 5, 2, 4, 0, 1, 1, 5, 0, 1, 0, 1, 0, 5, 1, 5, 0, 1, 2, 0, 0, 0, 5, 1, 0, 5, 0, 1, 0, 5, 4, 5, 0, 5, 2, 1, 0, 5, 1, 4, 0, 1, 0, 0, 0, 1, 5, 1, 0, 1, 10, 5, 0, 1, 1, 5, 0, 20, 0, 5, 0, 5, 1, 1, 0, 1, 8, 5, 0, 0, 5, 5, 0, 5, 0, 0, 0, 1, 5, 1, 0, 1
Offset: 1

Views

Author

Jianing Song, Apr 06 2019

Keywords

Comments

a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a six-power root of unity (1, (1 + sqrt(3)*i)/2, (-1 + sqrt(3)*i)/2, -1, (-1 - sqrt(3)*i)/2, (1 - sqrt(3)*i)/2).
Mobius transform of A319100.

Examples

			Let w = exp(2*Pi/6) = (1 + sqrt(3)*i)/2. For n = 19, the 5 sextic primitive Dirichlet characters modulo n are:
  Chi_1 = [0, 1, w, w, w - 1, -w, w - 1, 1, -1, w - 1, -w + 1, 1, -1, -w + 1, w, -w + 1, -w, -w, -1];
  Chi_2 = [0, 1, w - 1, w - 1, -w, w - 1, -w, 1, 1, -w, -w, 1, 1, -w, w - 1, -w, w - 1, w - 1, 1];
  Chi_3 = [0, 1, -1, -1, 1, 1, 1, 1, -1, 1, -1, 1, -1, -1, -1, -1, 1, 1, -1];
  Chi_4 = [0, 1, -w, -w, w - 1, -w, w - 1, 1, 1, w - 1, w - 1, 1, 1, w - 1, -w, w - 1, -w, -w, 1];
  Chi_5 = [0, 1, -w + 1, -w + 1, -w, w - 1, -w, 1, -1, -w, w, 1, -1, w, -w + 1, w, w - 1, w - 1, -1],
so a(19) = 5.
		

Crossrefs

Number of k-th power primitive Dirichlet characters modulo n: A114643 (k=2), A160498 (k=3), A160499 (k=4), A307380 (k=5), this sequence (k=6), A307382 (k=7), A329272 (k=8).
Cf. A319100 (number of solutions to x^6 == 1 (mod n)).

Programs

  • Mathematica
    f[2, e_] := Which[e == 1, 0, e == 2, 1, e == 3, 2, e >= 4, 0]; f[3, e_] := Which[e == 1, 1, e == 2, 4, e >= 3, 0]; f[p_, 1] := If[Mod[p, 6] == 1, 5, 1]; f[p_, e_] := 0; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)={
        my(r=1, f=factor(n));
        for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
            if(p==2, if(e==3, r*=2, if(e!=2, r=0; return(r))));
            if(p==3, if(e==2, r*=4, if(e!=1, r=0; return(r))));
            if(p>3, if(p%6==1&&e==1, r*=5, if(e!=1, r=0; return(r))));
        );
        return(r);
    } \\ Jianing Song, Nov 10 2019

Formula

Multiplicative with a(4) = 1, a(8) = 2, a(2^e) = 0 for e = 1 or e >= 4; a(3) = 1, a(9) = 4, a(3^e) = 0 for e >= 3; a(p) = 5 if p == 1 (mod 6) and 1 if p == 5 (mod 6), a(p^e) = 0 if p > 3 and e >= 2.

A307382 Number of septic primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Jianing Song, Apr 06 2019

Keywords

Comments

a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a seventh-power root of unity.
Mobius transform of A319101. Every term is 0 or a power of 6.

Examples

			Let w = exp(2*Pi/7). For n = 29, the 6 septic primitive Dirichlet characters modulo n are:
  Chi_1 = [0, 1, w, w^5, w^2, w, w^6, w^5, w^3, w^3, w^2, w^4, 1, w^4, w^6, w^6, w^4, 1, w^4, w^2, w^3, w^3, w^5, w^6, w, w^2, w^5, w, 1];
  Chi_2 = [0, 1, w^2, w^3, w^4, w^2, w^5, w^3, w^6, w^6, w^4, w, 1, w, w^5, w^5, w, 1, w, w^4, w^6, w^6, w^3, w^5, w^2, w^4, w^3, w^2, 1];
  Chi_3 = [0, 1, w^3, w, w^6, w^3, w^4, w, w^2, w^2, w^6, w^5, 1, w^5, w^4, w^4, w^5, 1, w^5, w^6, w^2, w^2, w, w^4, w^3, w^6, w, w^3, 1];
  Chi_4 = [0, 1, w^4, w^6, w, w^4, w^3, w^6, w^5, w^5, w, w^2, 1, w^2, w^3, w^3, w^2, 1, w^2, w, w^5, w^5, w^6, w^3, w^4, w, w^6, w^4, 1];
  Chi_5 = [0, 1, w^5, w^4, w^3, w^5, w^2, w^4, w, w, w^3, w^6, 1, w^6, w^2, w^2, w^6, 1, w^6, w^3, w, w, w^4, w^2, w^5, w^3, w^4, w^5, 1];
  Chi_6 = [0, 1, w^6, w^2, w^5, w^6, w, w^2, w^4, w^4, w^5, w^3, 1, w^3, w, w, w^3, 1, w^3, w^5, w^4, w^4, w^2, w, w^6, w^5, w^2, w^6, 1],
so a(29) = 6.
		

Crossrefs

Number of k-th power primitive Dirichlet characters modulo n: A114643 (k=2), A160498 (k=3), A160499 (k=4), A307380 (k=5), A307381 (k=6), this sequence (k=7), A329272 (k=8).
Cf. A319101 (number of solutions to x^7 == 1 (mod n)).

Programs

  • Mathematica
    f[7, 2] = 6; f[p_, e_] := If[Mod[p, 7] == 1 && e == 1, 6, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)=sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^7-1)%d, 0, 1)), 0))
    
  • PARI
    A307382(n) = { my(f=factor(n)); prod(i=1, #f~, if(((7==f[i,1])&&(2==f[i,2]))||((1==(f[i,1]%7))&&(1==f[i,2])),6,0)); }; \\ Antti Karttunen, Aug 22 2019

Formula

Multiplicative with a(p^e) = 6 if p^e = 49 or p == 1 (mod 7) and e = 1, otherwise 0.

Extensions

More terms from Antti Karttunen, Aug 22 2019

A329272 Number of octic primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 1, 1, 3, 0, 1, 2, 0, 0, 1, 1, 3, 0, 3, 4, 7, 0, 1, 3, 1, 0, 1, 2, 0, 0, 0, 1, 3, 0, 1, 8, 1, 0, 3, 0, 3, 0, 3, 6, 7, 0, 1, 1, 0, 0, 1, 4, 0, 0, 7, 3, 3, 0, 3, 2, 1, 0, 1, 3, 3, 0, 0, 0, 9, 0, 1, 7, 1, 0, 1, 0, 7, 0, 0, 1, 1, 0, 1, 12, 0, 0, 1, 1, 21, 0, 3, 2, 7, 0, 3
Offset: 1

Views

Author

Jianing Song, Nov 10 2019

Keywords

Comments

a(n) is the number of primitive Dirichlet characters modulo n such that all entries are 0 or a eighth-power root of unity (+-1, +-i, +-sqrt(2)/2 +- sqrt(2)/2*i, i = sqrt(-1)).
Mobius transform of A247257.

Examples

			Let w = exp(2*Pi*i/8) = sqrt(2)/2 + i*sqrt(2)/2. For n = 17, the 7 octic primitive Dirichlet characters modulo n are:
  Chi_1 = [0, 1, -i, w, -1, -w, -w^3, w^3, i, i, w^3, -w^3, -w, -1, w, -i, 1];
  Chi_2 = [0, 1, -1, i, 1, i, -i, -i, -1, -1, -i, -i, i, 1, i, -1, 1];
  Chi_3 = [0, 1, i, w^3, -1, -w^3, -w, w, -i, -i, w, -w, -w^3, -1, w^3, i, 1];
  Chi_4 = [0, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1];
  Chi_5 = [0, 1, -i, -w, -1, w, w^3, -w^3, i, i, -w^3, w^3, w, -1, -w, -i, 1];
  Chi_6 = [0, 1, -1, -i, 1, -i, i, i, -1, -1, i, i, -i, 1, -i, -1, 1];
  Chi_7 = [0, 1, i, -w^3, -1, w^3, w, -w, -i, -i, -w, w, w^3, -1, -w^3, i, 1],
so a(17) = 7.
		

Crossrefs

Number of k-th power primitive Dirichlet characters modulo n: A114643 (k=2), A160498 (k=3), A160499 (k=4), A307380 (k=5), A307381 (k=6), A307382 (k=7), this sequence (k=8).
Cf. A247257 (number of solutions to x^8 == 1 (mod n)).

Programs

  • Mathematica
    f[2, e_] := If[2 <= e <= 5, 2^(e-2), 0]; f[p_, e_] := If[e == 1, GCD[p-1, 8] - 1, 0];  a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 16 2020 *)
  • PARI
    a(n)={
        my(r=1, f=factor(n));
        for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]);
            if(p==2, if(e>=2&&e<=5, r*=2^(e-2), r=0; return(r)));
            if(p>2, if(e==1, r*=gcd(p-1,8)-1, r=0; return(r)));
        );
        return(r);
    }

Formula

Multiplicative with a(2^e) = 2^(e-2) for 2 <= e <= 5, a(2^e) = 0 for e = 1 or e >= 6; a(p^e) = gcd(p-1, 8)-1 if p > 2 and e = 1, a(p^e) = 0 if p > 2 and e >= 2.

A354058 Square array read by ascending antidiagonals: T(n,k) is the number of degree-k primitive Dirichlet characters modulo n.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 3, 0, 1, 0, 1, 0, 2, 2, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 2, 2, 0, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 5, 0, 3, 0, 1, 0, 1, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 1
Offset: 1

Views

Author

Jianing Song, May 16 2022

Keywords

Comments

Given n, T(n,k) only depends on gcd(k,psi(n)). For the truncated version see A354061.
Each column is multiplicative.
The n-th rows contains entirely 0's if and only if n == 2 (mod 4).
For n !== 2 (mod 4), T(n,psi(n)) > T(n,k) if k is not divisible by psi(n).
Proof: this is true if n is a prime power (see the formula below). Now suppose that n = Product_{i=1..r} (p_i)^(e_i). Since n !== 2 (mod 4), (p_i)^(e_i) != 2, so T((p_i)^(e_i),psi((p_i)^(e_i))) > 0 for each i. If k is not divisible by psi(n), then it is not divisible by some psi((p_{i_0})^(e_{i_0})), so T(n,psi(n)) = Product_{i=1..r} T((p_i)^(e_i),psi(n)) = Product_{i=1..r} T((p_i)^(e_i),psi((p_i)^(e_i))) > T((p_{i_0})^(e_{i_0}),k) * Product_{i!=i_0} T((p_i)^(e_i),psi((p_i)^(e_i))) >= Product_{i=1..r} T((p_i)^(e_i),k) = T(n,k).

Examples

			  n/k  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20
   1   1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1  1
   2   0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   3   0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1
   4   0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1
   5   0  1  0  3  0  1  0  3  0  1  0  3  0  1  0  3  0  1  0  3
   6   0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
   7   0  1  2  1  0  5  0  1  2  1  0  5  0  1  2  1  0  5  0  1
   8   0  2  0  2  0  2  0  2  0  2  0  2  0  2  0  2  0  2  0  2
   9   0  0  2  0  0  4  0  0  2  0  0  4  0  0  2  0  0  4  0  0
  10   0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  11   0  1  0  1  4  1  0  1  0  9  0  1  0  1  4  1  0  1  0  9
  12   0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1  0  1
  13   0  1  2  3  0  5  0  3  2  1  0 11  0  1  2  3  0  5  0  3
  14   0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  15   0  1  0  3  0  1  0  3  0  1  0  3  0  1  0  3  0  1  0  3
  16   0  0  0  4  0  0  0  4  0  0  0  4  0  0  0  4  0  0  0  4
  17   0  1  0  3  0  1  0  7  0  1  0  3  0  1  0 15  0  1  0  3
  18   0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  0
  19   0  1  2  1  0  5  0  1  8  1  0  5  0  1  2  1  0 17  0  1
  20   0  1  0  3  0  1  0  3  0  1  0  3  0  1  0  3  0  1  0  3
		

Crossrefs

k-th column: A114643 (k=2), A160498 (k=3), A160499 (k=4), A307380 (k=5), A307381 (k=6), A307382 (k=7), A329272 (k=8).
Moebius transform of A354057 applied to each column.
A354257 gives the smallest index for the nonzero terms in each row.
Cf. A007431.

Programs

  • PARI
    b(n,k)=my(Z=znstar(n)[2]); prod(i=1, #Z, gcd(k, Z[i]));
    T(n,k) = sumdiv(n, d, moebius(n/d)*b(d,k))

Formula

For odd primes p: T(p,k) = gcd(p-1,k)-1, T(p^e,k*p^(e-1)) = p^(e-2)*(p-1)*gcd(k,p-1), T(p^e,k) = 0 if k is not divisible by p^(e-1). T(2,k) = 0, T(4,k) = 1 for even k and 0 for odd k, T(2^e,k) = 2^(e-2) if k is divisible by 2^(e-2) and 0 otherwise.
T(n,psi(n)) = A007431(n). - Jianing Song, May 24 2022

A114811 Number of real, weakly primitive Dirichlet characters modulo n.

Original entry on oeis.org

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

Views

Author

Steven Finch, Feb 19 2006

Keywords

Comments

Any primitive Dirichlet character is weakly primitive (not conversely). Jager uses the phrase "proper character", but this conflicts with other authors (e.g., W. Ellison and F. Ellison, Prime Numbers, Wiley, 1985, p. 224) who use the word "proper" to mean the same as "primitive".

Examples

			 The function chi defined on the integers by chi(1)=1, chi(5)=-1 and chi(2)=chi(3)=chi(4)=chi(6)=0 [and extended periodically] is a weakly primitive character mod 6, but not mod 12 or mod 18. In this sense, we eliminate the "overcounting" of real Dirichlet characters in A060594.
		

Crossrefs

Programs

  • Mathematica
    rad[n_] := Times @@ First /@ FactorInteger[n]; A055231[n_] := Denominator[ n/rad[n]^2 ]; A114643[n_] := Sum[ MoebiusMu[n/d] * Sum[ If[ Mod[i^2 - 1, d] == 0, 1, 0], {i, 2, d}], {d, Divisors[n] } ]; A114643[1] = 1; a[n_] := Sum[ A114643[n/d], {d, Divisors[ A055231[n] ] } ]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jun 20 2013 *)
    f[p_, e_] := 0; f[p_, 1] = 2; f[2, e_] := 0; f[2, 1] = f[2, 2] = 1; f[2, 3] = 2; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 11 2023 *)
  • PARI
    A055231(n) = {my(f=factor(n)); for (k=1, #f~, if (f[k, 2] > 1, f[k, 2] = 0); ); factorback(f); } \\ From A055231
    A114643(n) = sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^2-1)%d, 0, 1)), 0)); \\ From A114643
    A114811(n) = sumdiv(A055231(n),d,A114643(n/d)); \\ Antti Karttunen, Sep 27 2018
    
  • PARI
    A114811(n) = { my(f=factor(n)); for(i=1,#f~,if(2==f[i,1],if(f[i,2]<3,f[i,2]=0,if(3==f[i,2],f[i,2]=1,f[i,1]=0)),if(f[i,2]>1,f[i,1]=0,f[i,1]=2))); factorback(f); }; \\ Antti Karttunen, Sep 27 2018, after Steven Finch's multiplicative formula.

Formula

a(n) = sum A114643(n/d), where the sum is over all divisors 1<=d<=n of A055231(n).
This sequence is multiplicative with a(2)=1, a(4)=1, a(8)=2, a(2^r)=0 for r>2, a(p)=2 for prime p>2 and a(p^r)=0 for r>1. - Steven Finch, Mar 08 2006
Showing 1-8 of 8 results.