Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #18 Aug 05 2019 04:41:09
%S 0,1,1,1,1,1,2,2,3,2,1,3,2,2,3,3,2,3,3,1,3,2,3,3,5,2,2,6,2,4,1,3,2,3,
%T 5,2,2,2,6,6,6,7,2,6,4,4,4,5,6,5,6,3,1,3,7,9,9,2,5,2,2,6,4,5,6,6,4,3,
%U 8,3,6,6,7,5,6,9,8,6,4,4
%N a(n) = |{0 < g < prime(n): g is a primitive root mod prime(n) with g = sum_{j=1..k} prime(j) for some k > 0}|.
%C Conjecture: (i) a(n) > 0 for all n > 1. In other words, for any odd prime p, there is a positive integer k such that the sum of the first k primes is not only a primitive root modulo p but also smaller than p.
%C (ii) For any n > 1, there is a number k among 1, ..., n such that sum_{j=1..k}(-1)^(k-j)*prime(j) is a primitive root modulo prime(n).
%C We have verified parts (i) and (ii) for n up to 700000 and 250000 respectively. Note that prime(700000) > 10^7.
%H Zhi-Wei Sun, <a href="/A242266/b242266.txt">Table of n, a(n) for n = 1..10000</a>
%H Zhi-Wei Sun, <a href="http://arxiv.org/abs/1405.0290">Notes on primitive roots modulo primes</a>, arXiv:1405.0290 [math.NT], 2014.
%e a(4) = 1 since prime(1) + prime(2) = 2 + 3 = 5 is a primitive root modulo prime(4) = 7 with 5 < 7.
%e a(7) = 2 since prime(1) = 2 and prime(1) + prime(2) + prime(3) = 2 + 3 + 5 = 10 are not only primitive roots modulo prime(7) = 17 but also smaller than 17.
%e a(53) = 1 since sum_{j=1..10} prime(j) = 129 is a primitive root modulo prime(53) = 241 with 129 < 241.
%t f[0]=0
%t f[n_]:=Prime[n]+f[n-1]
%t dv[n_]:=Divisors[n]
%t Do[m=0;Do[If[f[k]>=Prime[n],Goto[cc]];Do[If[Mod[f[k]^(Part[dv[Prime[n]-1],i]),Prime[n]]==1,Goto[aa]],{i,1,Length[dv[Prime[n]-1]]-1}];m=m+1;Label[aa];Continue,{k,1,n}];Label[cc];Print[n," ",m];Continue,{n,1,80}]
%Y Cf. A000040, A008347, A007504, A236966, A239957, A241476, A241504, A241516, A242248, A242250, A242277.
%K nonn
%O 1,7
%A _Zhi-Wei Sun_, May 09 2014