[go: up one dir, main page]

login
A242860
a(n) is the least k >= 2 such that k is neither a square modulo n nor a primitive root (mod n), or 0 if no such value exists.
0
0, 2, 0, 2, 6, 2, 3, 2, 10, 2, 5, 6, 2, 2, 0, 2, 8, 2, 2, 2, 22, 2, 5, 2, 3, 2, 12, 2, 6, 2, 2, 6, 2, 2, 6, 2, 2, 2, 3, 2, 2, 2, 2, 10, 46, 2, 6, 2, 2, 2, 23, 2, 2, 2, 2, 2, 58, 2, 8, 6, 2, 2, 2, 2, 3, 2, 2, 2, 14, 2, 7, 2, 2, 2, 2, 2, 12, 2, 3, 3, 82, 2, 2, 2
OFFSET
3,2
COMMENTS
a(A019434(n)) = 0 for n >= 1.
LINKS
Eric Weisstein's World of Mathematics, Primitive Root
PROG
(Magma) lst:=[]; for n in [3..86] do v:=0; for r in [2..n-1] do if not IsSquare(ResidueClassRing(n)! r) and not IsPrimitive(r, n) then v:=r; break; end if; end for; lst:=Append(lst, v); end for; lst;
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved