This site is supported by donations to The OEIS Foundation.

 Annual Appeal: Please make a donation to keep the OEIS running. In 2018 we replaced the server with a faster one, added 20000 new sequences, and reached 7000 citations (often saying "discovered thanks to the OEIS"). Other ways to donate

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A165601 Midpoint height of Jacobi-bridge, computed for 4n+3. a(n) = Sum_{i=0..(2n+1)} J(i,4n+3), where J(i,m) is the Jacobi symbol. 13
 1, 1, 3, 2, 3, 3, 1, 3, 6, 4, 3, 5, 6, 4, 9, 2, 3, 7, 2, 5, 9, 6, 6, 8, 0, 5, 9, 8, 6, 10, 6, 5, 15, 2, 9, 10, 0, 7, 12, 10, 3, 11, 6, 2, 15, 8, 6, 13, 12, 9, 12, 0, 9, 14, 12, 7, 15, 12, 6, 15, 1, 6, 21, 12, 12, 13, 6, 11, 0, 6, 9, 14, 12, 8, 24, 10, 9, 19, 0, 10, 12, 12, 9, 18, 18, 1, 15 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,3 LINKS A. Karttunen, Table of n, a(n) for n = 0..269535 MATHEMATICA Table[Sum[JacobiSymbol[i, 4n + 3], {i, 0, 2n + 1}], {n, 0, 100}] (* Indranil Ghosh, May 13 2017 *) PROG (MIT Scheme:) (define (A165601 n) (let ((w (A004767 n))) (add (lambda (i) (jacobi-symbol i w)) 0 (/ (-1+ w) 2)))) (define (add intfun lowlim uplim) (let sumloop ((i lowlim) (res 0)) (cond ((> i uplim) res) (else (sumloop (1+ i) (+ res (intfun i))))))) (define jacobi-symbol fix:jacobi-symbol) (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))))))))) (PARI) a(n) = sum(i=0, 2*n + 1, kronecker(i, 4*n + 3)); \\ Indranil Ghosh, May 13 2017 (Python) from sympy import jacobi_symbol as J def a(n): return sum([J(i, 4*n + 3) for i in xrange(2*n + 2)]) # Indranil Ghosh, May 13 2017 CROSSREFS Trisections: A165604, A165605, A165606. Cf. A165602, A165603, A165460, A166045, A166046, A166047. Sequence in context: A230406 A214254 A153092 * A275821 A291674 A265157 Adjacent sequences:  A165598 A165599 A165600 * A165602 A165603 A165604 KEYWORD nonn AUTHOR Antti Karttunen, Oct 06 2009 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified December 13 08:08 EST 2018. Contains 318082 sequences. (Running on oeis4.)