A179416 a(n)=1 if (n modulo 65536)+1 is a quadratic residue of 65537, 0 otherwise.
1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0
Offset: 0
Keywords
Links
- A. Karttunen, Table of n, a(n) for n = 0..65535
Programs
-
Sage
def A179416_list(n) : # for n <= 65536 Q = quadratic_residues(65537) return [int(i in Q) for i in (1..n)] A179416_list(102) # Peter Luschny, Aug 08 2012
Formula
a(n) = 1 if A165471(1+(n%65536))=+1, otherwise 0. Period 65536.
Comments