login
A050871
Row sums of even numbered rows of array T in A050870 (periodic binary words).
3
0, 2, 4, 10, 16, 34, 76, 130, 256, 568, 1036, 2050, 4336, 8194, 16396, 33814, 65536, 131074, 266176, 524290, 1048816, 2113462, 4194316, 8388610, 16842496, 33555424, 67108876, 134479360, 268435696, 536870914, 1074793396, 2147483650
OFFSET
0,2
PROG
(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
row(n) = vector(n+1, k, k--; T(n, k));
a(n) = n*=2; vecsum(row(n)); \\ Michel Marcus, Aug 20 2021
(Python)
from sympy import mobius, divisors
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
CROSSREFS
Sequence in context: A153927 A117862 A105024 * A348305 A277918 A238720
KEYWORD
nonn
EXTENSIONS
a(29) onward corrected by Sean A. Irvine, Aug 20 2021
STATUS
approved