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.

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.