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.

Showing 1-4 of 4 results.

A136806 Nonsquares mod 65537.

Original entry on oeis.org

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

Views

Author

T. D. Noe, Jan 22 2008

Keywords

Comments

Because 65537 is a Fermat prime, these numbers are all primitive roots (mod 65537). Complement of A136805.

Examples

			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.
		

Crossrefs

Cf. A136805 (squares mod 65537); A136803 and A136804 ((non)squares mod 257).
Cf. A028730.

Programs

  • 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 &]
  • 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

Formula

a(n) + a(32769 - n) = 65537.

A010379 Squares mod 17.

Original entry on oeis.org

0, 1, 2, 4, 8, 9, 13, 15, 16
Offset: 1

Views

Author

Keywords

Crossrefs

Row 17 of A096008.

Programs

  • Mathematica
    Union[PowerMod[Range[17], 2, 17]] (* Alonso del Arte, Dec 17 2019 *)
  • Sage
    [quadratic_residues(17)] # Zerinvary Lajos, May 24 2009
    
  • Scala
    (1 to 17).map(n => (n * n) % 17).toSet.toSeq.sorted // Alonso del Arte, Dec 17 2019

A351026 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.

Original entry on oeis.org

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

Views

Author

Arkadiusz Wesolowski, Jan 29 2022

Keywords

Crossrefs

Programs

  • 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, ", ")))));

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.

A242860 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.

Original entry on oeis.org

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

Views

Author

Arkadiusz Wesolowski, May 24 2014

Keywords

Comments

a(A019434(n)) = 0 for n >= 1.

Crossrefs

Programs

  • 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;
Showing 1-4 of 4 results.