Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a136806 -id:a136806
     Sort: relevance | references | number | modified | created      Format: long | short | data
Squares mod 257.
+10
12
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, 44, 46, 49, 50, 52, 57, 58, 59, 60, 61, 62, 64, 67, 68, 70, 72, 73, 79, 81, 84, 88, 89, 92, 95, 98, 99, 100, 104, 111, 113, 114, 116, 117, 118, 120, 121, 122, 123, 124
OFFSET
1,3
COMMENTS
Because 257 is a Fermat prime, the complement of this set, A136804, is the set of primitive roots (mod 257).
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..129 (full sequence)
FORMULA
a(n) + a(131-n) = 257 for n>1.
MAPLE
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
MATHEMATICA
p = 257; Select[Range[0, p - 1], JacobiSymbol[ #, p] == 1 &] (* T. D. Noe *)
Table[Mod[n^2, 257], {n, 0, 65}] (* Alonso del Arte, Feb 14 2013 *)
PROG
(PARI) for (n=0, 256, if (issquare(Mod(n, 257)), print1(n, ", "))) \\ Michel Marcus, Mar 12 2017
(PARI) A136803=Set([k^2 | k <- [0..256]]%257); \\ M. F. Hasler, Nov 15 2017
(PARI) lift(select(issquare, Mod([0..256], 257))) \\ M. F. Hasler, Nov 15 2017
CROSSREFS
Cf. A136804 (nonsquares mod 257), A136805 and A136806 (squares/nonsquares mod 65537).
KEYWORD
fini,full,easy,nonn
AUTHOR
T. D. Noe, Jan 22 2008
STATUS
approved
Nonsquares mod 257.
+10
6
3, 5, 6, 7, 10, 12, 14, 19, 20, 24, 27, 28, 33, 37, 38, 39, 40, 41, 43, 45, 47, 48, 51, 53, 54, 55, 56, 63, 65, 66, 69, 71, 74, 75, 76, 77, 78, 80, 82, 83, 85, 86, 87, 90, 91, 93, 94, 96, 97, 101, 102, 103, 105, 106, 107, 108, 109, 110, 112, 115, 119, 125, 126
OFFSET
1,1
COMMENTS
Because 257 is a Fermat prime, these numbers are all primitive roots (mod 257). Complement of A136803.
FORMULA
a(n) + a(129-n) = 257.
MAPLE
A136804 := {$(0..256)}: for n from 0 to 256 do A136804 := A136804 minus {n^2 mod 257}: od: op(sort(convert(A136804, list))); # Nathaniel Johnston, Jun 23 2011
MATHEMATICA
p=257; Select[Range[0, p-1], JacobiSymbol[ #, p]==-1&]
PROG
(PARI) for (n=0, 256, if (! issquare(Mod(n, 257)), print1(n, ", "))) \\ Michel Marcus, Mar 12 2017
(PARI) A136804=setminus(S=[0..256], Set([k^2 | k <- S]%257)); \\ M. F. Hasler, Nov 15 2017
CROSSREFS
Cf. A136803 (squares mod 257), A136805 and A136806 (squares/nonsquares mod 65537).
KEYWORD
fini,full,easy,nonn
AUTHOR
T. D. Noe, Jan 22 2008
STATUS
approved
Squares mod 65537.
+10
5
0, 1, 2, 4, 8, 9, 13, 15, 16, 17, 18, 19, 21, 25, 26, 30, 32, 33, 34, 35, 36, 37, 38, 42, 49, 50, 52, 53, 55, 60, 64, 66, 68, 69, 70, 71, 72, 74, 76, 77, 79, 81, 84, 87, 93, 97, 98, 100, 103, 104, 106, 107, 109, 110, 115, 117, 120, 121, 123, 128, 129, 132, 135
OFFSET
1,3
COMMENTS
Because 65537 is a Fermat prime, the complement of this set, A136806, is the set of primitive roots (mod 65537).
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 1..32769 (full sequence)
FORMULA
a(n) + a(32771 - n) = 65537 for n > 1.
MAPLE
A136805:={}: for n from 0 to 65536 do A136805 := A136805 union {n^2 mod 65537}: od: l:=sort(convert(A136805, list)): l[1..63]; # Nathaniel Johnston, Jun 23 2011
MATHEMATICA
p = 65537; Select[Range[0, p - 1], JacobiSymbol[#, p] == 1 &]
PROG
(Sage) [quadratic_residues(65537)] # Zerinvary Lajos, May 24 2009
(PARI) A136805=Set([k^2 | k <- [0..2^16]]%65537); \\ M. F. Hasler, Nov 15 2017
(Scala) ((1: BigInt) to (65537: BigInt)).map(n => (n * n) % 65537).toSet.toSeq.sorted // Alonso del Arte, Dec 17 2019
CROSSREFS
Cf. A136806 (nonsquares mod 65537); A136803 and A136804 ((non)squares mod 257).
Cf. A010379.
KEYWORD
fini,full,easy,nonn
AUTHOR
T. D. Noe, Jan 22 2008
STATUS
approved
Nonsquares mod 17.
+10
4
3, 5, 6, 7, 10, 11, 12, 14
OFFSET
1,1
COMMENTS
Numbers n such that x^2 == n mod 17 has no solution.
MATHEMATICA
p = 17; Complement[Range[p - 1], Union[Mod[Range[(p - 1)/2]^2, p]]] (* Harvey P. Dale, Apr 26 2011 *)
Select[Range[0, 16], JacobiSymbol[#, 17] == -1 &] (* Alonso del Arte, Dec 17 2019 *)
PROG
(Scala) (0 to 16).diff((1 to 17).map(n => (n * n) % 17)) // Alonso del Arte, Dec 17 2019
CROSSREFS
KEYWORD
nonn,fini,full
STATUS
approved
Possible bases b > 17 which can be used in Pepin's test to check the primality of any Fermat number greater than 5 only in the case when the base b is smaller than the tested number.
+10
1
51, 85, 102, 119, 170, 204, 238, 291, 340, 408, 459, 476, 485, 579, 582, 663, 679, 680, 697, 723, 765, 771, 816, 867, 918, 952, 965, 970, 1071, 1105, 1158, 1164, 1205, 1275, 1285, 1326, 1351, 1358, 1360, 1394, 1445, 1446, 1530, 1542, 1547, 1632, 1687, 1734, 1785
OFFSET
1,1
LINKS
R. D. Carmichael, Fermat numbers F(n) = 2^(2^n) + 1, Amer. J. Math., 26 (1919), 137-146.
Eric Weisstein's World of Mathematics, Pepin's Test
FORMULA
A positive integer b belongs to this sequence if and only if the Jacobi symbol J(b,F(m)) has value 0 or 1 for some 5 < F(m) < b, and J(b,F(m)) = 1 only for a finite number of Fermat numbers F(m) = 2^(2^m) + 1.
PROG
(PARI) for(b=18, 1785, a=q=0; until(b-2<16^(2^a), a++; if(!(kronecker(b, 16^(2^(a-1))+1)==-1), q=1; break)); if(q==1, k=b/2^valuation(b, 2); if(k>1, i=logint(k, 2); m=Mod(2, k); z=znorder(m); e=znorder(Mod(2, z/2^valuation(z, 2))); t=0; for(c=1, e, if(kronecker(lift(m^2^(i+c))+1, k)==-1, t++, break)); if(t==e, print1(b, ", ")))));
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved
a(n) is the least k >= 2 such that k is neither a square modulo n nor a primitive root (mod n), or 0 if no such value exists.
+10
0
0, 2, 0, 2, 6, 2, 3, 2, 10, 2, 5, 6, 2, 2, 0, 2, 8, 2, 2, 2, 22, 2, 5, 2, 3, 2, 12, 2, 6, 2, 2, 6, 2, 2, 6, 2, 2, 2, 3, 2, 2, 2, 2, 10, 46, 2, 6, 2, 2, 2, 23, 2, 2, 2, 2, 2, 58, 2, 8, 6, 2, 2, 2, 2, 3, 2, 2, 2, 14, 2, 7, 2, 2, 2, 2, 2, 12, 2, 3, 3, 82, 2, 2, 2
OFFSET
3,2
COMMENTS
a(A019434(n)) = 0 for n >= 1.
LINKS
Eric Weisstein's World of Mathematics, Primitive Root
PROG
(Magma) lst:=[]; for n in [3..86] do v:=0; for r in [2..n-1] do if not IsSquare(ResidueClassRing(n)! r) and not IsPrimitive(r, n) then v:=r; break; end if; end for; lst:=Append(lst, v); end for; lst;
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved

Search completed in 0.009 seconds