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.

A166049 Integers of the form 4n+1 for which Sum_{i=1..u} J(i,4n+1) is never negative for any u in range [1,(2n)], where J(i,k) is the Jacobi symbol.

This page as a plain text file.
%I A166049 #9 Apr 05 2020 04:59:30
%S A166049 1,5,9,13,21,25,37,49,81,85,93,121,165,169,225,289,361,441,529,625,
%T A166049 729,841,961,1089,1225,1369,1521,1681,1849,2025,2209,2401,2601,2809,
%U A166049 3025,3249,3481,3721,3969,4225,4489,4761,5041,5329,5625,5929,6241
%N A166049 Integers of the form 4n+1 for which Sum_{i=1..u} J(i,4n+1) is never negative for any u in range [1,(2n)], where J(i,k) is the Jacobi symbol.
%o A166049 (Sage)
%o A166049 def is_Motzkin(n, k):
%o A166049     s = 0
%o A166049     for i in (1..k):
%o A166049         s += jacobi_symbol(i, n)
%o A166049         if s < 0: return False
%o A166049     return True
%o A166049 def A166049_list(n):
%o A166049     return [m for m in range(1, n + 1, 4) if is_Motzkin(m, m // 2)]
%o A166049 A166049_list(6241) # _Peter Luschny_, Aug 08 2012
%Y A166049 a(n) = A016813(A166048(n)). Union of A016754 and A166051.
%K A166049 nonn
%O A166049 1,2
%A A166049 _Antti Karttunen_, Oct 08 2009