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!)
A239957 a(n) = |{0 < g < prime(n): g is a primitive root modulo prime(n) of the form k^2 + 1}|. 14

%I #29 May 01 2014 16:50:14

%S 1,1,1,1,1,1,2,2,3,3,1,3,2,2,3,4,4,4,2,1,2,1,3,3,6,3,3,7,4,5,2,8,3,5,

%T 6,1,2,5,8,10,7,3,2,6,8,2,3,5,8,4,7,4,2,5,8,9,10,5,8,6,10,6,4,9,6,9,5,

%U 3,13,5,8,9,5,6,8,13,13,6,6,5

%N a(n) = |{0 < g < prime(n): g is a primitive root modulo prime(n) of the form k^2 + 1}|.

%C Conjecture: (i) a(n) > 0 for all n > 0. In other words, every prime p has a primitive root 0 < g < p of the form k^2 + 1, where k is an integer.

%C (ii) If p > 3 is a prime not equal to 13, then p has a primitive root 0 < g < p which is of the form k^2 - 1, where k is a positive integer.

%C See also A239963 for a similar conjecture.

%H Zhi-Wei Sun, <a href="/A239957/b239957.txt">Table of n, a(n) for n = 1..10000</a>

%e a(6) = 1 since 1^2 + 1 = 2 is a primitive root modulo prime(6) = 13.

%e a(11) = 1 since 4^2 + 1 = 17 is a primitive root modulo prime(11) = 31.

%e a(20) = 1 since 8^2 + 1 = 65 is a primitive root modulo prime(20) = 71.

%e a(22) = 1 since 6^2 + 1 = 37 is a primitive root modulo prime(22) = 79.

%e a(36) = 1 since 9^2 + 1 = 82 is a primitive root modulo prime(36) = 151.

%t f[k_]:=k^2+1

%t dv[n_]:=Divisors[n]

%t Do[m=0;Do[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,0,Sqrt[Prime[n]-2]}];Print[n," ",m];Continue,{n,1,80}]

%o (PARI) ispr(n, p)=my(f=factor(p-1)[, 1], m=Mod(n, p)); for(i=1, #f, if(m^(p\f[i])==1, return(0))); m^(p-1)==1

%o a(n)=my(p=prime(n)); sum(k=0, sqrtint(p-2), ispr(k^2+1, p)) \\ _Charles R Greathouse IV_, May 01 2014

%Y Cf. A000040, A002522, A236308, A236966, A237112, A237121, A237594, A239963.

%K nonn

%O 1,7

%A _Zhi-Wei Sun_, Apr 23 2014

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 24 22:17 EDT 2024. Contains 371964 sequences. (Running on oeis4.)