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.

A179416 a(n)=1 if (n modulo 65536)+1 is a quadratic residue of 65537, 0 otherwise.

This page as a plain text file.
%I A179416 #7 Aug 09 2012 06:25:48
%S A179416 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,
%T A179416 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,
%U A179416 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
%N A179416 a(n)=1 if (n modulo 65536)+1 is a quadratic residue of 65537, 0 otherwise.
%C A179416 This sequence gives essentially the same information as A165471, but in contrast to it (and A165472), the period of this sequence is explicitly defined as 65536 (instead of 65537), so that in essence the zeros at A165471(k*65537) are silently skipped. Several derived sequences to be computed.
%H A179416 A. Karttunen, <a href="/A179416/b179416.txt">Table of n, a(n) for n = 0..65535</a>
%F A179416 a(n) = 1 if A165471(1+(n%65536))=+1, otherwise 0. Period 65536.
%o A179416 (MIT Scheme:)
%o A179416 (define (A179416 n) (1+halved (A165471 (1+ (modulo n 65536)))))
%o A179416 (define (1+halved n) (floor->exact (/ (1+ n) 2)))
%o A179416 (Sage)
%o A179416 def A179416_list(n) :  # for n <= 65536
%o A179416     Q = quadratic_residues(65537)
%o A179416     return [int(i in Q) for i in (1..n)]
%o A179416 A179416_list(102) # _Peter Luschny_, Aug 08 2012
%K A179416 nonn
%O A179416 0,1
%A A179416 _Antti Karttunen_, Jul 27 2010