cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A136806 Nonsquares mod 65537.

This page as a plain text file.
%I A136806 #37 Mar 15 2024 03:43:43
%S A136806 3,5,6,7,10,11,12,14,20,22,23,24,27,28,29,31,39,40,41,43,44,45,46,47,
%T A136806 48,51,54,56,57,58,59,61,62,63,65,67,73,75,78,80,82,83,85,86,88,89,90,
%U A136806 91,92,94,95,96,99,101,102,105,108,111,112,113,114,116,118,119
%N A136806 Nonsquares mod 65537.
%C A136806 Because 65537 is a Fermat prime, these numbers are all primitive roots (mod 65537). Complement of A136805.
%H A136806 Nathaniel Johnston, <a href="/A136806/b136806.txt">Table of n, a(n) for n = 1..32768</a> (full sequence)
%H A136806 OEIS Wiki, <a href="/index/Sq#squares">Index to sequences related to squares</a>
%F A136806 a(n) + a(32769 - n) = 65537.
%e A136806 Since 7 is not a perfect square, and there are no solutions to x^2 = 7 mod 65537, 7 is in the sequence.
%e A136806 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.
%p A136806 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
%p A136806 # Much more efficient:
%p A136806 S:= {$0..65536} minus {seq(i^2 mod 65537, i=0..65537/2)}:
%p A136806 A:= sort(convert(S,list)):
%p A136806 A[1..64]; # _Robert Israel_, Nov 15 2017
%t A136806 p = 65537; Select[Range[0, p - 1], JacobiSymbol[#, p] == -1 &]
%o A136806 (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
%o A136806 (Scala) (1 to 65537).diff(((1: BigInt) to (65537: BigInt)).map(n => n * n % 65537)) // _Alonso del Arte_, Jan 17 2020
%Y A136806 Cf. A136805 (squares mod 65537); A136803 and A136804 ((non)squares mod 257).
%Y A136806 Cf. A028730.
%K A136806 fini,full,easy,nonn
%O A136806 1,1
%A A136806 _T. D. Noe_, Jan 22 2008