cp's OEIS Frontend

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.

A050872 a(n) = (1/2)*A050871 (row sums of array T in A050870, periodic binary words).

This page as a plain text file.
%I A050872 #19 Sep 22 2024 02:07:18
%S A050872 0,1,2,5,8,17,38,65,128,284,518,1025,2168,4097,8198,16907,32768,65537,
%T A050872 133088,262145,524408,1056731,2097158,4194305,8421248,16777712,
%U A050872 33554438,67239680,134217848,268435457,537396698,1073741825,2147483648
%N A050872 a(n) = (1/2)*A050871 (row sums of array T in A050870, periodic binary words).
%o A050872 (PARI) T(n, k) = binomial(n, k) - sumdiv(gcd(n+!n, k), d, moebius(d)*binomial(n/d, k/d)); \\ A050870
%o A050872 row(n) = vector(n+1, k, k--; T(n, k));
%o A050872 a(n) = n*=2; vecsum(row(n))/2; \\ _Michel Marcus_, Aug 20 2021
%o A050872 (Python)
%o A050872 from sympy import mobius, divisors
%o A050872 def A050872(n): return -sum(mobius((n<<1)//d)<<d-1 for d in divisors(n<<1,generator=True) if d<n<<1) # _Chai Wah Wu_, Sep 21 2024
%Y A050872 Cf. A050870, A050871.
%K A050872 nonn
%O A050872 0,3
%A A050872 _Clark Kimberling_
%E A050872 a(29) onward corrected by _Sean A. Irvine_, Aug 20 2021