A260960 Least positive integer k < prime(n) such that there are 0 < i < j with i^2 + j^2 = k^2 for which (i*j)/2 is a primitive root modulo prime(n), or 0 if no such k exists.
0, 0, 0, 0, 5, 5, 5, 17, 13, 17, 10, 10, 5, 13, 13, 25, 5, 5, 39, 25, 17, 5, 5, 5, 17, 29, 5, 5, 5, 5, 5, 5, 5, 34, 17, 5, 5, 26, 13, 13, 5, 10, 29, 13, 13, 5, 34, 5, 5, 5, 5, 25, 25, 5, 5, 13, 17, 5, 5, 10, 29, 13, 13, 61, 17, 13, 17, 17, 5, 13
Offset: 1
Keywords
Examples
a(7) = 5 since 3^2 + 4^2 = 5^2, and (3*4)/2 = 6 is a primitive root modulo prime(7) = 17.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
SQ[n_]:=IntegerQ[Sqrt[n]] Dv[n_]:=Divisors[Prime[n]-1] Do[Do[Do[If[SQ[k^2-j^2]==False, Goto[cc]];Do[If[Mod[(j*Sqrt[k^2-j^2]/2)^(Part[Dv[n],t]),Prime[n]]==1,Goto[cc]];Continue,{t,1,Length[Dv[n]]-1}]; Print[n," ",k];Goto[aa];Label[cc];Continue,{j,1,k-1}];Label[dd];Continue,{k,1,Prime[n]-1}];Print[n," ",0];Label[aa];Continue,{n,1,70}]
Comments