login
A317649
Numbers whose least primitive root is an odd prime.
2
4, 6, 7, 10, 14, 17, 18, 22, 23, 26, 31, 34, 38, 43, 46, 47, 49, 50, 54, 58, 62, 71, 73, 74, 79, 82, 86, 89, 94, 97, 98, 103, 106, 113, 118, 122, 127, 134, 137, 142, 146, 157, 158, 162, 166, 167, 178, 191, 193, 194, 199, 202, 206, 214, 218, 223, 226, 233, 239, 241, 242, 250, 254, 257, 262, 263
OFFSET
1,1
COMMENTS
The first odd number in the sequence whose square is not in the sequence is 40487.
LINKS
EXAMPLE
a(3)=7 is included because the least primitive root mod 7 is 3, an odd prime.
8 is not included because there is no primitive root mod 8 (the multiplicative group mod 8 is not cyclic).
9 is not included because the least primitive root mod 9 is 2.
MAPLE
filter:= proc(n) local p;
p:= numtheory:-primroot(n);
if p = FAIL then return false fi;
p>2 and isprime(p)
end proc:
select(filter, [$1..1000]);
MATHEMATICA
Select[Range@ 263, If[# == {}, False, And[PrimeQ@ #, # > 2] &@ #[[1]] ] &@ PrimitiveRootList[#] &] (* Michael De Vlieger, Aug 02 2018 *)
PROG
(PARI) isok(n) = my(r=lift(znprimroot(prime(n)))); isprime(r) && (r%2); \\ Michel Marcus, Aug 04 2018
CROSSREFS
Subset of A033948.
Cf. A048976.
Sequence in context: A049306 A358731 A023635 * A265036 A366506 A310652
KEYWORD
nonn
AUTHOR
Robert Israel, Aug 02 2018
STATUS
approved