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 A050871 #15 Sep 22 2024 02:07:13 %S A050871 0,2,4,10,16,34,76,130,256,568,1036,2050,4336,8194,16396,33814,65536, %T A050871 131074,266176,524290,1048816,2113462,4194316,8388610,16842496, %U A050871 33555424,67108876,134479360,268435696,536870914,1074793396,2147483650 %N A050871 Row sums of even numbered rows of array T in A050870 (periodic binary words). %o A050871 (PARI) T(n, k) = binomial(n, k) - sumdiv(gcd(n+!n, k), d, moebius(d)*binomial(n/d, k/d)); \\ _Michel Marcus_, Aug 20 2021 %o A050871 row(n) = vector(n+1, k, k--; T(n, k)); %o A050871 a(n) = n*=2; vecsum(row(n)); \\ _Michel Marcus_, Aug 20 2021 %o A050871 (Python) %o A050871 from sympy import mobius, divisors %o A050871 def A050871(n): return -sum(mobius((n<<1)//d)<<d for d in divisors(n<<1,generator=True) if d<n<<1) # _Chai Wah Wu_, Sep 21 2024 %Y A050871 Cf. A050870, A050872. %K A050871 nonn %O A050871 0,2 %A A050871 _Clark Kimberling_ %E A050871 a(29) onward corrected by _Sean A. Irvine_, Aug 20 2021