login
A136806
Nonsquares mod 65537.
7
3, 5, 6, 7, 10, 11, 12, 14, 20, 22, 23, 24, 27, 28, 29, 31, 39, 40, 41, 43, 44, 45, 46, 47, 48, 51, 54, 56, 57, 58, 59, 61, 62, 63, 65, 67, 73, 75, 78, 80, 82, 83, 85, 86, 88, 89, 90, 91, 92, 94, 95, 96, 99, 101, 102, 105, 108, 111, 112, 113, 114, 116, 118, 119
OFFSET
1,1
COMMENTS
Because 65537 is a Fermat prime, these numbers are all primitive roots (mod 65537). Complement of A136805.
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..32768 (full sequence)
FORMULA
a(n) + a(32769 - n) = 65537.
EXAMPLE
Since 7 is not a perfect square, and there are no solutions to x^2 = 7 mod 65537, 7 is in the sequence.
Although 8 is not a perfect square either, there are solutions to x^2 = 8 mod 65537, such as x = 8160, so 8 is not in the sequence.
MAPLE
A136806 := {$(0..65536)}: for n from 0 to 65536 do A136806 := A136806 minus {n^2 mod 65537}: od: l:=sort(convert(A136806, list)): l[1..64]; # Nathaniel Johnston, Jun 23 2011
# Much more efficient:
S:= {$0..65536} minus {seq(i^2 mod 65537, i=0..65537/2)}:
A:= sort(convert(S, list)):
A[1..64]; # Robert Israel, Nov 15 2017
MATHEMATICA
p = 65537; Select[Range[0, p - 1], JacobiSymbol[#, p] == -1 &]
PROG
(PARI) A136806=select( is_A136806(n)=!issquare(Mod(n, 65537)), [0..2^16]); \\ Strictly speaking, the is(.) function should include "&& n<65537" according to the intended meaning of the definition of this sequence. See A136804 for faster code, which would here cause a stack overflow for default settings. - M. F. Hasler, Nov 15 2017
(Scala) (1 to 65537).diff(((1: BigInt) to (65537: BigInt)).map(n => n * n % 65537)) // Alonso del Arte, Jan 17 2020
CROSSREFS
Cf. A136805 (squares mod 65537); A136803 and A136804 ((non)squares mod 257).
Cf. A028730.
Sequence in context: A204232 A028730 A028747 * A253550 A295307 A073803
KEYWORD
fini,full,easy,nonn
AUTHOR
T. D. Noe, Jan 22 2008
STATUS
approved