login
Row sums of even numbered rows of array T in A050870 (periodic binary words).
3

%I #15 Sep 22 2024 02:07:13

%S 0,2,4,10,16,34,76,130,256,568,1036,2050,4336,8194,16396,33814,65536,

%T 131074,266176,524290,1048816,2113462,4194316,8388610,16842496,

%U 33555424,67108876,134479360,268435696,536870914,1074793396,2147483650

%N Row sums of even numbered rows of array T in A050870 (periodic binary words).

%o (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 row(n) = vector(n+1, k, k--; T(n, k));

%o a(n) = n*=2; vecsum(row(n)); \\ _Michel Marcus_, Aug 20 2021

%o (Python)

%o from sympy import mobius, divisors

%o 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 Cf. A050870, A050872.

%K nonn

%O 0,2

%A _Clark Kimberling_

%E a(29) onward corrected by _Sean A. Irvine_, Aug 20 2021