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 A382117 #51 May 03 2025 18:55:36 %S A382117 1,1,1,2,0,2,1,4,1,4,1,4,0,6,0,8,0,6,1,8,2,10,1,8,0,12,1,12,0,8,1,16, %T A382117 2,16,0,12,0,18,0,16,0,12,1,20,0,22,1,16,1,20,0,24,0,18,0,24,2,28,1, %U A382117 16,0,30,2,32,0,20,1,32,2,24,1,24,0,36,0,36,2,24 %N A382117 a(n) = sum (-1)^(((x - 1)*(y - 1))/4), where x and y are coprime positive integers, equidistant from n, such that x <= y. %C A382117 Sequence inspired by the law of quadratic reciprocity. %e A382117 a(4)=2 because (-1)^(((1 - 1)*(7 - 1))/4) + (-1)^(((3 - 1)*(5 - 1))/4) = (-1)^0 + (-1)^2 = 1 + 1 = 2. %o A382117 (PARI) a(n) = sum(x=1, n, my(y=2*n-x); if ((x<=y) && (gcd(x, y)==1), (-1)^(((x-1)*(y-1))/4))); \\ _Michel Marcus_, Apr 27 2025 %Y A382117 Cf. A309812 (indices of zeros). %K A382117 nonn %O A382117 1,4 %A A382117 _Mike Jones_, Apr 26 2025 %E A382117 More terms from _Alois P. Heinz_, Apr 26 2025