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.
%I A165471 #11 May 13 2013 01:49:10 %S A165471 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, %T A165471 -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, %U A165471 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 %N A165471 Legendre symbol (n,65537). %C A165471 65537 is the 4th Fermat prime, A019434(4). %H A165471 A. Karttunen, <a href="/A165471/b165471.txt">Table of n, a(n) for n = 0..65537</a> %o A165471 (MIT Scheme, using fixnum-implementation of jacobi-symbol that works only up to 2^25-1 = 33554431): %o A165471 (define (A165471 n) (legendre-symbol n 65537)) %o A165471 (define legendre-symbol jacobi-symbol) %o A165471 (define jacobi-symbol fix:jacobi-symbol) %o A165471 (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))))))))) %o A165471 (PARI) a(n)=kronecker(n,65537) \\ _Charles R Greathouse IV_, Oct 31 2011 %o A165471 (Sage) %o A165471 def A165471(n): return legendre_symbol(n,65537) %o A165471 [A165471(n) for n in range(82)] # _Peter Luschny_, Aug 09 2012 %Y A165471 Partial sums: A165472. %K A165471 sign,mult,easy %O A165471 0,1 %A A165471 _Antti Karttunen_, Sep 21 2009