%I #61 May 16 2020 04:36:04
%S 1,2,6,12,30,54,126,240,504,990,2046,4020,8190,16254,32730,65280,
%T 131070,261576,524286,1047540,2097018,4192254,8388606,16772880,
%U 33554400,67100670,134217216,268419060,536870910,1073708010,2147483646
%N Row sums of triangle T(m,n) = number of solutions to 1 <= a(1) < a(2) < ... < a(m) <= n, where gcd(a(1), a(2), ..., a(m), n) = 1, in A020921.
%C The function T(m,n) described above has an inverse: see A038200.
%C 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
%H Reinhard Zumkeller, <a href="/A038199/b038199.txt">Table of n, a(n) for n = 1..1000</a>
%H Henk Bruin, C. Carminati, and C. Kalle, <a href="https://arxiv.org/abs/1610.01872">Matching for generalised beta-transformations</a>, arXiv preprint arXiv:1610.01872 [math.DS], 2016.
%H Henk Bruin, C. Carminati, and C. Kalle, <a href="https://doi.org/10.1016/j.indag.2016.11.005">Matching for generalised beta-transformations</a>, Indagationes Mathematicae 28 (2017), 55-73.
%H M. B. Nathanson, <a href="https://arxiv.org/abs/math/0608150">Primitive sets and Euler phi function for subsets of {1,2,...,n}</a>, arXiv:math/0608150 [math.NT], 2006-2007.
%H Prapanpong Pongsriiam, <a href="http://arxiv.org/abs/1306.4891">Relatively Prime Sets, Divisor Sums, and Partial Sums</a>, arXiv:1306.4891 [math.NT], 2013 and <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/Pongsriiam/pong2.html">J. Int. Seq. 16 (2013) #13.9.1</a>.
%H P. Pongsriiam, <a href="https://www.emis.de/journals/INTEGERS/papers/n49/n49.Abstract.html">A remark on relatively prime sets</a>, Integers 13 (2013), A49.
%H Temba Shonhiwa, <a href="http://www.fq.math.ca/Scanned/37-1/shonhiwa.pdf">A Generalization of the Euler and Jordan Totient Functions</a>, Fib. Quart., 37 (1999), 67-76.
%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lambert_series">Lambert series</a>.
%F a(n) = Sum_{d | n} mu(n/d)*(2^d-1). - _Paul Barry_, Mar 20 2005
%F Lambert g.f.: Sum_{n>=1} a(n)*x^n/(1 - x^n) = x/((1 - x)*(1 - 2*x)). - _Ilya Gutkovskiy_, Apr 25 2017
%F O.g.f.: Sum_{d >= 1} mu(d)*(x^d/((1 - x^d)*(1 - 2*x^d)). - _Petros Hadjicostas_, Jun 18 2019
%t Table[Plus@@((2^Divisors[n]-1)MoebiusMu[n/Divisors[n]]),{n,1,31}] (* Brad Chalfan (brad(AT)chalfan.net), May 29 2006 *)
%o (Haskell)
%o a038199 n = sum [a008683 (n `div` d) * (a000225 d)| d <- a027750_row n]
%o -- _Reinhard Zumkeller_, Feb 17 2013
%o (Python)
%o from sympy import mobius, divisors
%o def a(n): return sum(mobius(n//d) * (2**d - 1) for d in divisors(n))
%o print([a(n) for n in range(1, 51)]) # _Indranil Ghosh_, Jun 28 2017
%o (PARI) a(n) = sumdiv(n, d, moebius(n/d)*(2^d-1)); \\ _Michel Marcus_, Jun 28 2017
%Y A027375, A038199 and A056267 are all essentially the same sequence with different initial terms.
%Y Cf. A000225, A008683, A020921, A023995, A027750, A038200, A130887.
%Y Cf. A059966 (a(n)/n).
%K nonn,easy,nice
%O 1,2
%A Temba Shonhiwa (Temba(AT)maths.uz.ac.zw)
%E Better description from _Michael Somos_
%E More terms from _Naohiro Nomoto_, Sep 10 2001
%E More terms from Brad Chalfan (brad(AT)chalfan.net), May 29 2006