OFFSET
0,3
COMMENTS
a(p) = 2 for p prime.
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2000
Achilles A. Beros, Bjørn Kjos-Hanssen, and Daylan Kaui Yogi, Planar digraphs for automatic complexity, arXiv:1902.00812 [cs.FL], 2019.
FORMULA
a(n) = 2^n - A001037(n) * n for n>0, a(0) = 0.
a(n) = 2^n - A027375(n) for n>0, a(0) = 0.
a(n) = 2^n - Sum_{d|n} mu(n/d) 2^d for n>0, a(0) = 0.
a(n) = 2^n - A143324(n,2).
a(n) = 2 * A178472(n) for n > 0. - Alois P. Heinz, Jul 04 2019
EXAMPLE
a(3) = 2 = |{ 000, 111 }|, a(4) = 4 = |{ 0000, 1111, 0101, 1010 }|.
MAPLE
with(numtheory):
a:= n-> `if`(n=0, 0, 2^n -add(mobius(n/d)*2^d, d=divisors(n))):
seq(a(n), n=0..100); # Alois P. Heinz, Sep 26 2011
MATHEMATICA
a[0] = 0; a[n_] := 2^n - Sum[MoebiusMu[n/d]*2^d, {d, Divisors[n]}];
Table[a[n], {n, 0, 50}] (* Jean-François Alcover, Jul 04 2019 *)
PROG
(Python)
from sympy import mobius, divisors
def A152061(n): return -sum(mobius(n//d)<<d for d in divisors(n, generator=True) if d<n) # Chai Wah Wu, Sep 21 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Jin S. Choi, Sep 24 2011
STATUS
approved