%I #8 Dec 23 2018 14:45:31
%S 1,0,0,1,2,2,2,2,3,3,2,2,2,1,2,2,3,3,2,1,1,0,1,1,1,1,0,1,1,1,1,0,0,-1,
%T -1,-1,-1,-1,0,0,1,1,0,0,0,0,1,0,1,1,1,0,0,0,0,1,1,1,1,1,0,0,0,-1,-1,
%U -1,0,0,1,1,1,2,1,1,1,2,2,2,2,2,1,1,0,0,-1
%N Partial sums of A089451.
%C a(n) is the number of primes p among the first n ones such that the sum of primitive roots is congruent to +1 modulo p minus the number of primes p among the first n ones such that the sum of primitive roots is congruent to -1 modulo p. Here, the prime number 2 is counted in the minuends but not in the subtrahends.
%C Although there are more positive terms among the first few ones, there are 5887 negative ones among the first 10000 terms, along with 237 zeros.
%C The largest terms among the first 10000 ones are a(n) = 41 for n in {8389, 8749, 8750, 8751, 8752, 8753}, and the smallest being a(n) = -41 for n in {4037, 4038, 4039, 4040, 4041, 4043, 4044, 4045, 4063, 4064, 4065, 4081, 4082, 4083, 4086, 4098, 4099, 4100}. What is the rate of growth for sup_{i=1..n} a(i) and inf_{i=1..n} a(i)?
%e prime(11) = 31, mu(1) = mu(6) = mu(10) = mu(22) = +1, mu(2) = mu(30) = -1, so a(11) = 4 - 2 = 2.
%e prime(22) = 79, mu(1) = mu(6) = mu(10) = mu(22) = mu(46) = mu(58) = +1, mu(2) = mu(30) = mu(42) = mu(66) = mu(70) = mu(78) = -1, so a(22) = 6 - 6 = 0.
%o (PARI) a(n) = sum(i=1, n, moebius(prime(i)-1))
%Y Cf. A089451.
%Y Cf. Also A049092, A078330, A088144, A088179.
%K sign
%O 1,5
%A _Jianing Song_, Dec 22 2018
|