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)
OEIS Wiki, Index to sequences related to squares
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
KEYWORD
fini,full,easy,nonn
AUTHOR
T. D. Noe, Jan 22 2008
STATUS
approved