login
A114811
Number of real, weakly primitive Dirichlet characters modulo n.
1
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,3
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".
LINKS
H. Jager, On the number of Dirichlet characters with modulus not exceeding x, Nederl. Akad. Wetensch. Proc. Ser. A 76 = Indag. Math. 35 (1973) 452-455.
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
EXAMPLE
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.
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 *)
PROG
(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.
CROSSREFS
KEYWORD
nonn,mult
AUTHOR
Steven Finch, Feb 19 2006
STATUS
approved