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 A166100 #12 Jul 09 2025 04:30:56 %S A166100 1,1,5,7,27,22,39,15,68,76,63,92,250,117,203,186,165,175,333,156,410, %T A166100 430,270,423,1029,357,689,440,513,767,915,504,780,1072,759,994,1314, %U A166100 725,1155,1343,2187,1577,1360,957,1958,1547,1395,1330,2328,1485,2525 %N A166100 Sum of those positive i <= 2n+1, for which J(i,2n+1)=+1. Here J(i,k) is the Jacobi symbol. %C A166100 Note that this sequence is not equal to the sum of the quadratic residues of 2n+1 in range [1,2n+1], and thus NOT a bisection of A165898. %H A166100 A. Karttunen, <a href="/A166100/b166100.txt">Table of n, a(n) for n = 0..131071</a> %H A166100 Wikipedia, <a href="http://en.wikipedia.org/wiki/Jacobi_symbol">Jacobi symbol</a> %e A166100 For n=5, we get odd number 11 (2*5+1), and J(i,11) = 1,-1,1,1,1,-1,-1,-1,1,-1,0 when i ranges from 1 to 11, J(i,11) getting value 1 when i=1, 3, 4, 5 and 9, thus a(5)=22. %t A166100 Table[Total[Flatten[Position[JacobiSymbol[Range[2n+1],2n+1],1]]],{n,0,50}] (* _Harvey P. Dale_, Jun 19 2013 *) %o A166100 (MIT Scheme:) (define (A166100 n) (let ((w (A005408 n))) (let loop ((i 1) (s 1)) (cond ((= i w) s) (else (loop (1+ i) (+ s (if (= 1 (jacobi-symbol (1+ i) w)) (1+ i) 0)))))))) %o A166100 (Python) %o A166100 from sympy import jacobi_symbol as J %o A166100 def a(n): return sum([i for i in range(1, 2*n + 2) if J(i, 2*n + 1)==1]) # _Indranil Ghosh_, Jun 12 2017 %Y A166100 A076409(n)=a(A102781(n)). Cf. A166101-A166104, A166405, A166406. %Y A166100 Scheme-code for jacobi-symbol is given at A165601. %K A166100 nonn %O A166100 0,3 %A A166100 _Antti Karttunen_, Oct 13 2009. Erroneous name corrected Oct 20 2009