A384490 Numbers m such that both roots of x^2 - x - 1 modulo m are primitive roots modulo m.
41, 61, 109, 149, 241, 269, 389, 409, 449, 569, 601, 641, 701, 821, 929, 1129, 1181, 1201, 1301, 1321, 1429, 1481, 1489, 1609, 1801, 1889, 1901, 1949, 2129, 2141, 2309, 2341, 2381, 2549, 2609, 2741, 2909, 3061, 3109, 3181, 3209, 3221, 3229, 3361, 3449, 3541
Offset: 1
Keywords
Examples
For m = 41 the roots of x^2 - x - 1 (mod 41) are 7 and 35. 7 and 35 are both primitive roots modulo 41.
Links
- Wikipedia, Primitive root modulo n.
Programs
-
Mathematica
test[p_]:=Module[{inv2,sqr},If[JacobiSymbol[5,p]==1,inv2=ModularInverse[2,p]; sqr=PowerMod[5,1/2,p]; {MultiplicativeOrder[Mod[inv2*(sqr-1),p],p],MultiplicativeOrder[Mod[inv2*(-sqr-1),p],p]} == {p-1,p-1},False]]; Cases[Prime[Range[4, 5000]], ?(test[#] &)] (* _Shenghui Yang, Jun 01 2025 *)
-
PARI
{ forprime(p=2, 3600, s=polrootsmod(x^2 - x - 1,p); if( #s==2 && p-1==znorder(Mod(s[1],p)) && p-1==znorder(Mod(s[2],p)), print1(p,", "); ); ); } \\ Joerg Arndt, May 31 2025
Comments