Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A165471 Legendre symbol (n,65537). 10
0, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, -1, -1, 1, 1, -1, -1, -1, 1, -1, 1, 1, 1, 1, 1, 1, 1, -1, -1, -1, 1, -1, -1, -1, -1, -1, -1, 1, 1, -1, 1, 1, -1, 1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, 1, -1, 1, 1, 1, 1, 1, -1, 1, -1, 1, 1, -1, 1, -1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
65537 is the 4th Fermat prime, A019434(4).
LINKS
PROG
(MIT Scheme, using fixnum-implementation of jacobi-symbol that works only up to 2^25-1 = 33554431):
(define (A165471 n) (legendre-symbol n 65537))
(define legendre-symbol jacobi-symbol)
(define jacobi-symbol fix:jacobi-symbol)
(define (fix:jacobi-symbol p q) (if (not (and (fix:fixnum? p) (fix:fixnum? q) (fix:= 1 (fix:and q 1)))) (error "fix:jacobi-symbol: args must be fixnums, and 2. arg should be odd: " p q) (let loop ((p p) (q q) (s 0)) (cond ((fix:zero? p) 0) ((fix:= 1 p) (fix:- 1 (fix:and s 2))) ((fix:= 1 (fix:and p 1)) (loop (fix:remainder q p) p (fix:xor s (fix:and p q)))) (else (loop (fix:lsh p -1) q (fix:xor s (fix:xor q (fix:lsh q -1)))))))))
(PARI) a(n)=kronecker(n, 65537) \\ Charles R Greathouse IV, Oct 31 2011
(Sage)
def A165471(n): return legendre_symbol(n, 65537)
[A165471(n) for n in range(82)] # Peter Luschny, Aug 09 2012
CROSSREFS
Partial sums: A165472.
Sequence in context: A011630 A011631 A165591 * A165481 A165573 A057428
KEYWORD
sign,mult,easy
AUTHOR
Antti Karttunen, Sep 21 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 07:06 EDT 2024. Contains 375255 sequences. (Running on oeis4.)