|
|
A057125
|
|
Numbers n such that 3 is a square mod n.
|
|
12
|
|
|
1, 2, 3, 6, 11, 13, 22, 23, 26, 33, 37, 39, 46, 47, 59, 61, 66, 69, 71, 73, 74, 78, 83, 94, 97, 107, 109, 111, 118, 121, 122, 131, 138, 141, 142, 143, 146, 157, 166, 167, 169, 177, 179, 181, 183, 191, 193, 194, 213, 214, 218, 219, 222, 227, 229, 239, 241, 242
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Numbers that are not multiples of 4 or 9 and for which all prime factors greater than 3 are congruent to +/- 1 mod 12. - Eric M. Schmidt, Apr 21 2013
|
|
LINKS
|
|
|
EXAMPLE
|
3^2==3 (mod 6), so 6 is a member.
|
|
MAPLE
|
# Beware: Since 2007 at least and up to Maple 16 at least, the following Maple code returns the wrong answer for n = 6:
with(numtheory): [seq(`if`(mroot(3, 2, n)=FAIL, NULL, n), n=1..400)];
# second Maple program:
with(numtheory): mroot(3, 2, 6):=3:
a:= proc(n) option remember; local m;
for m from 1+`if`(n=1, 0, a(n-1))
while mroot(3, 2, m)=FAIL do od; m
end:
|
|
MATHEMATICA
|
Prepend[ Select[ Range[300], Reduce[Mod[3 - k^2, #] == 0, k, Integers] =!= False &], 1] (* Jean-François Alcover, Sep 20 2012 *)
|
|
PROG
|
(PARI) isok(n) = issquare(Mod(3, n)); \\ Michel Marcus, Feb 19 2016
(Magma) [n: n in [1..300] | exists(t){x : x in ResidueClassRing(n) | x^2 eq 3}]; // Vincenzo Librandi, Feb 20 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|