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 A369873 #25 Jan 20 2025 10:52:24 %S A369873 0,0,0,0,0,2,0,0,0,0,0,2,0,0,0,0,0,0,0,2,0,0,0,6,0,0,0,2,0,6,0,0,0,0, %T A369873 0,0,0,0,0,4,0,4,0,0,0,0,0,10,0,0,0,0,0,4,0,2,0,0,0,34,0,0,0,0,0,4,0, %U A369873 0,0,2,0,0,0,0,0,0,0,4,0,6,0,0,0,28,0,0,0,2,0,26,0,0,0,0,0,22,0,0,0,0,0,4,0,2,0 %N A369873 a(n) is the constant term in the expansion of Product_{d|n} (x^d + 1/x^d). %C A369873 a(n) is the number of solutions to 0 = Sum_{d|n} c_i * d with c_i in {-1,1}, i=1..tau(n), tau = A000005. %H A369873 Antti Karttunen, <a href="/A369873/b369873.txt">Table of n, a(n) for n = 1..10000</a> %F A369873 From _Joerg Arndt_, Feb 04 2024: (Start) %F A369873 a(n) != 0 (only) for n in A083207. %F A369873 a(n) = 2 * A083206(n). (End) %t A369873 Table[Coefficient[Product[(x^d + 1/x^d), {d, Divisors[n]}], x, 0], {n, 1, 90}] %o A369873 (Python) %o A369873 from collections import Counter %o A369873 from sympy import divisors %o A369873 def A369873(n): %o A369873 c = {0:1} %o A369873 for d in divisors(n,generator=True): %o A369873 b = Counter() %o A369873 for j in c: %o A369873 a = c[j] %o A369873 b[j+d] += a %o A369873 b[j-d] += a %o A369873 c = b %o A369873 return c[0] # _Chai Wah Wu_, Feb 05 2024 %o A369873 (PARI) A369873(n) = { my(s=sigma(n),p=1); if(s%2 || s < 2*n, 0, fordiv(n, d, p *= ('x^d + 'x^-d)); polcoeff(p, 0)); }; \\ (cf. also code in A083206 and A379504) - _Antti Karttunen_, Jan 20 2025 %Y A369873 Cf. A000005, A033630, A063865, A083206, A083207, A379504. %K A369873 nonn %O A369873 1,6 %A A369873 _Ilya Gutkovskiy_, Feb 03 2024 %E A369873 Data section extended to a(105) by _Antti Karttunen_, Jan 20 2025