%I #20 Nov 16 2017 05:31:42
%S 0,1,2,4,8,9,11,13,15,16,17,18,21,22,23,25,26,29,30,31,32,34,35,36,42,
%T 44,46,49,50,52,57,58,59,60,61,62,64,67,68,70,72,73,79,81,84,88,89,92,
%U 95,98,99,100,104,111,113,114,116,117,118,120,121,122,123,124
%N Squares mod 257.
%C Because 257 is a Fermat prime, the complement of this set, A136804, is the set of primitive roots (mod 257).
%H Nathaniel Johnston, <a href="/A136803/b136803.txt">Table of n, a(n) for n = 1..129</a> (full sequence)
%H OEIS Wiki, <a href="/index/Sq#squares">Index to sequences related to squares</a>
%F a(n) + a(131-n) = 257 for n>1.
%p A136803 := {}: for n from 0 to 256 do A136803 := A136803 union {n^2 mod 257}: od: op(sort(convert(A136803,list))); # _Nathaniel Johnston_, Jun 23 2011
%t p = 257; Select[Range[0, p - 1], JacobiSymbol[ #, p] == 1 &] (* _T. D. Noe_ *)
%t Table[Mod[n^2, 257], {n, 0, 65}] (* _Alonso del Arte_, Feb 14 2013 *)
%o (PARI) for (n=0, 256, if (issquare(Mod(n, 257)), print1(n, ", "))) \\ _Michel Marcus_, Mar 12 2017
%o (PARI) A136803=Set([k^2 | k <- [0..256]]%257); \\ _M. F. Hasler_, Nov 15 2017
%o (PARI) lift(select(issquare,Mod([0..256],257))) \\ _M. F. Hasler_, Nov 15 2017
%Y Cf. A136804 (nonsquares mod 257), A136805 and A136806 (squares/nonsquares mod 65537).
%K fini,full,easy,nonn
%O 1,3
%A _T. D. Noe_, Jan 22 2008