OFFSET
1,2
COMMENTS
The function T(m,n) described above has an inverse: see A038200.
Also, Moebius transform of 2^n - 1 = A000225. Also, number of rationals in [0, 1) whose binary expansions consist just of repeating bits of (least) period exactly n (i.e., there's no preperiodic part), where 0 = 0.000... is considered to have period 1. - Brad Chalfan (brad(AT)chalfan.net), May 29 2006
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..1000
Henk Bruin, Carlo Carminati, and Charlene Kalle, Matching for generalised beta-transformations, arXiv preprint arXiv:1610.01872 [math.DS], 2016.
Henk Bruin, Carlo Carminati, and Charlene Kalle, Matching for generalised beta-transformations, Indagationes Mathematicae 28 (2017), 55-73.
Jason D. Chadwick, Mariesa H. Teo, Joshua Viszlai, Willers Yang, and Frederic T. Chong, Erasure Minesweeper: exploring hybrid-erasure surface code architectures for efficient quantum error correction, arXiv:2505.00066 [quant-ph], 2025. See p. 14.
Melvyn B. Nathanson, Primitive sets and Euler phi function for subsets of {1,2,...,n}, arXiv:math/0608150 [math.NT], 2006-2007.
Prapanpong Pongsriiam, Relatively Prime Sets, Divisor Sums, and Partial Sums, arXiv:1306.4891 [math.NT], 2013 and J. Int. Seq. 16 (2013) #13.9.1.
Prapanpong Pongsriiam, A remark on relatively prime sets, Integers 13 (2013), A49.
Temba Shonhiwa, A Generalization of the Euler and Jordan Totient Functions, Fib. Quart., 37 (1999), 67-76.
Wikipedia, Lambert series.
FORMULA
a(n) = Sum_{d | n} mu(n/d)*(2^d-1). - Paul Barry, Mar 20 2005
Lambert g.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = x/((1 - x)*(1 - 2*x)). - Ilya Gutkovskiy, Apr 25 2017
O.g.f.: Sum_{d >= 1} mu(d)*x^d/((1 - x^d)*(1 - 2*x^d)). - Petros Hadjicostas, Jun 18 2019
MAPLE
a:= proc(n) option remember;
2^n-1-add(a(d), d=numtheory[divisors](n) minus {n})
end:
seq(a(n), n=1..35); # Alois P. Heinz, Oct 04 2025
MATHEMATICA
Table[Plus@@((2^Divisors[n]-1)MoebiusMu[n/Divisors[n]]), {n, 1, 31}] (* Brad Chalfan (brad(AT)chalfan.net), May 29 2006 *)
PROG
(Haskell)
a038199 n = sum [a008683 (n `div` d) * (a000225 d)| d <- a027750_row n]
-- Reinhard Zumkeller, Feb 17 2013
(Python)
from sympy import mobius, divisors
def a(n): return sum(mobius(n//d) * (2**d - 1) for d in divisors(n))
print([a(n) for n in range(1, 51)]) # Indranil Ghosh, Jun 28 2017
(PARI) a(n) = sumdiv(n, d, moebius(n/d)*(2^d-1)); \\ Michel Marcus, Jun 28 2017
CROSSREFS
Cf. A059966 (a(n)/n).
KEYWORD
nonn,easy,nice
AUTHOR
Temba Shonhiwa (Temba(AT)maths.uz.ac.zw)
EXTENSIONS
Better description from Michael Somos
More terms from Naohiro Nomoto, Sep 10 2001
More terms from Brad Chalfan (brad(AT)chalfan.net), May 29 2006
STATUS
approved
