login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A114643 Number of real primitive Dirichlet characters modulo n. 9

%I #51 Sep 16 2020 05:02:45

%S 1,0,1,1,1,0,1,2,0,0,1,1,1,0,1,0,1,0,1,1,1,0,1,2,0,0,0,1,1,0,1,0,1,0,

%T 1,0,1,0,1,2,1,0,1,1,0,0,1,0,0,0,1,1,1,0,1,2,1,0,1,1,1,0,0,0,1,0,1,1,

%U 1,0,1,0,1,0,0,1,1,0,1,0,0,0,1,1,1,0,1,2,1,0,1,1,1,0,1,0,1,0,0,0,1,0,1,2,1

%N Number of real primitive Dirichlet characters modulo n.

%C a(n) = 1 if either n or -n is a fundamental discriminant (not both); a(n) = 2 if n and -n are fundamental discriminants; a(n) = 0 otherwise. Also, Sum_{k=1..n} a(k) is asymptotic to (6/Pi^2)*n.

%C From _Jianing Song_, Feb 27 2019: (Start)

%C If n is an odd squarefree number, then a(n) = 1, where the unique real primitive Dirichlet character modulo n is {Kronecker(n,k)} = {Jacobi(k,n)} if n == 1 (mod 4) and {Kronecker(-n,k)} = {Jacobi(k,n)} if n == 3 (mod 4).

%C If n = 4*m, m is an odd squarefree number, then a(n) is also 1, where the unique real primitive Dirichlet character modulo n is {Kronecker(-n,k)} if m == 1 (mod 4) and {Kronecker(n,k)} if m == 3 (mod 4).

%C If n is 8 times an odd squarefree number, then a(n) = 2, where the two real primitive Dirichlet characters modulo n are {Kronecker(n,k)} and {Kronecker(-n,k)}.

%C a(n) = 0 if n == 2 (mod 4), n is divisible by 16 or the square of an odd prime. (End)

%C Mobius transform of A060594. - _Jianing Song_, Mar 02 2019

%D W. Ellison and F. Ellison, Prime Numbers, Wiley, 1985, pp. 224-226.

%H Robert Israel, <a href="/A114643/b114643.txt">Table of n, a(n) for n = 1..10000</a>

%H Steven R. Finch, <a href="http://www.people.fas.harvard.edu/~sfinch/">Cubic and quartic characters</a> [Broken link]

%H Steven R. Finch, <a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.638.5547">Cubic and quartic characters</a>.

%H Vaclav Kotesovec, <a href="/A114643/a114643.jpg">Graph - the asymptotic ratio</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DirichletL-Series.html">Dirichlet L-Series</a>.

%H I. J. Zucker and M. M. Robertson, <a href="https://doi.org/10.1088/0305-4470/9/8/006">Some properties of Dirichlet L-series</a>, J. Phys. A 9 (1976) 1207-1214.

%F This sequence is multiplicative with a(2) = 0, a(4) = 1, a(8) = 2, a(2^r) = 0 for r > 3, a(p) = 1 for prime p > 2 and a(p^r) = 0 for r > 1. - _Steven Finch_, Mar 08 2006 (With correction by _Jianing Song_, Jun 28 2018)

%F Dirichlet g.f.: zeta(s)*(1 + 2^(-2s) + 2^(1-3s))/(zeta(2s)*(1 + 2^(-s))). - _R. J. Mathar_, Jul 03 2011

%e From _Jianing Song_, Feb 27 2019: (Start)

%e For n = 5, the only real primitive Dirichlet characters modulo n is {Kronecker(5,k)} = [0, 1, -1, -1, 1] = A080891, so a(5) = 1.

%e For n = 8, the real primitive Dirichlet characters modulo n are {Kronecker(8,k)} = [0, 1, 0, -1, 0, -1, 0, 1] = A091337 and [0, 1, 0, 1, 0, -1, 0, -1] = A188510, so a(8) = 2.

%e For n = 20, the only real primitive Dirichlet characters modulo n is {Kronecker(-20,k)} = [0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, -1, 0, 0, 0, -1, 0, -1] = A289741, so a(20) = 1. (End)

%p A114643 := proc(n)

%p local a,pf,p,r;

%p a := 1 ;

%p for pf in ifactors(n)[2] do

%p p := op(1,pf);

%p r := op(2,pf);

%p if p = 2 then

%p if r = 1 then

%p a := 0 ;

%p elif r = 2 then

%p ;

%p elif r = 3 then

%p a := a*2 ;

%p elif r >= 4 then

%p a := 0 ;

%p end if;

%p else

%p if r =1 then

%p ;

%p else

%p a := 0 ;

%p end if;

%p end if;

%p end do:

%p a ;

%p end proc:

%p seq(A114643(n),n=1..40) ; # _R. J. Mathar_, Mar 02 2015

%p # Alternative:

%p f:= proc(n) local r,v,F;

%p v:= padic:-ordp(n,2);

%p if v = 1 or v >= 4 then return 0

%p elif v = 3 then r:= 2

%p else r:= 1

%p fi;

%p if numtheory:-issqrfree(n/2^v) then r else 0 fi

%p end proc:

%p map(f, [$1..100]); # _Robert Israel_, Oct 08 2017

%t a[n_] := Sum[ MoebiusMu[n/d] * Sum[ If[ Mod[i^2 - 1, d] == 0, 1, 0], {i, 2, d}], {d, Divisors[n]}]; a[1] = 1; Table[a[n], {n, 1, 105}] (* _Jean-François Alcover_, Jun 20 2013, after _Steven Finch_ *)

%t f[2, e_] := Which[e == 1, 0, e == 2, 1, e == 3, 2, e >= 4, 0]; f[p_, e_] := If[e == 1, 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* _Amiram Eldar_, Sep 16 2020 *)

%o (PARI) a(n)=sum(d=1, n, if(n%d==0, moebius(n/d)*sum(i=1, d, if((i^2-1)%d, 0, 1)), 0)) \\ _Steven Finch_, Jun 09 2009

%Y Cf. A003657, A003658.

%Y Cf. A160498 (number of cubic primitive Dirichlet characters modulo n), A160499 (number of quartic primitive Dirichlet characters modulo n).

%Y Cf. A060594 (number of solutions to x^2 == 1 (mod n)).

%K nonn,mult

%O 1,8

%A _Steven Finch_, Feb 16 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 14:32 EDT 2024. Contains 371914 sequences. (Running on oeis4.)