login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A028792
Nonsquares mod 79.
1
3, 6, 7, 12, 14, 15, 17, 24, 27, 28, 29, 30, 33, 34, 35, 37, 39, 41, 43, 47, 48, 53, 54, 56, 57, 58, 59, 60, 61, 63, 66, 68, 69, 70, 71, 74, 75, 77, 78
OFFSET
1,1
FORMULA
Legendre symbol (a(n)/79) = -1. - Alonso del Arte, Jan 15 2017
EXAMPLE
x^2 = 7 mod 79 has no solutions, hence 7 is in the sequence.
x^2 = 8 mod 79 has the solutions x = 18 and x = 61, so 8 is not in the sequence.
MATHEMATICA
Complement[Range[78], PowerMod[Range[78], 2, 79]] (* Alonso del Arte, Jan 15 2017 *)
PROG
(PARI) isok(n) = (n < 79) && (kronecker(n, 79) == -1); \\ Michel Marcus, Jan 15 2017
(PARI) isok(n) = (n < 79) && (! issquare(Mod(n, 79))); \\ Michel Marcus, Jan 15 2017
(Scala) (0 to 78).diff((1 to 79).map(n => n * n % 79)) // Alonso del Arte, Jan 22 2020
(Magma) [n: n in [0..78] | not IsSquare(R! n) where R:= ResidueClassRing(79)]; // Vincenzo Librandi, Jan 23 2020
CROSSREFS
Cf. A010440 (complement), A096013 (row 79).
Sequence in context: A182181 A138038 A095029 * A325804 A144795 A364292
KEYWORD
nonn,fini,full,easy
STATUS
approved