A034738 Dirichlet convolution of b_n = 2^(n-1) with phi(n).
1, 3, 6, 12, 20, 42, 70, 144, 270, 540, 1034, 2112, 4108, 8274, 16440, 32928, 65552, 131418, 262162, 524880, 1048740, 2098206, 4194326, 8391024, 16777300, 33558564, 67109418, 134226120, 268435484, 536888520, 1073741854, 2147516736
Offset: 1
Keywords
Examples
For the compositions of n=4 we have a(4) = gcd(4) + gcd(1,3) + gcd(3,1) + gcd(2,2) + gcd(2,1,1) + gcd(1,2,1) + gcd(1,1,2) + gcd(1,1,1,1) = 4 + 1 + 1 + 2 + 1 + 1 + 1 + 1 = 12. Also, for cyclic compositions of n=4, we have length(4) + length(1,3) + length(2,2) + length(1,1,2) + length(1,1,1,1) = 1 + 2 + 2 + 3 + 4 = 12.
Links
- Amiram Eldar, Table of n, a(n) for n = 1..3322
- P. Hadjicostas, Cyclic compositions of a positive integer with parts avoiding an arithmetic sequence, J. Integer Sequences 19 (2016), Article 16.8.2.
- R. A. Perez, Compositions versus cyclic compositions, JP Journal of Algebra, Number Theory and Applications, Vol. 12, Issue 1 (2008), pp. 41-48.
- Silvana Ramaj, New Results on Cyclic Compositions and Multicompositions, Master's Thesis, Georgia Southern Univ., 2021. See pp. 47-48, 50.
Programs
-
Mathematica
Table[Sum[EulerPhi[d]*2^(n/d-1), {d, Divisors[n]}], {n, 1, 40}] (* Vaclav Kotesovec, Feb 07 2019 *)
-
PARI
a(n) = sum(k=1, n, 2^(gcd(k, n)-1)); \\ Seiichi Manyama, Apr 17 2021
-
PARI
a(n) = sumdiv(n, d, eulerphi(n/d)*2^(d-1)); \\ Seiichi Manyama, Apr 17 2021
-
PARI
my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)*x^k/(1-2*x^k))) \\ Seiichi Manyama, Apr 17 2021
Formula
a(n) = A053635(n)/2.
a(n) = (1/2)* Sum_{d|n} phi(d)*2^(n/d), n >= 1.
G.f.: Sum_{s>=1} phi(s)*x^s/(1-2*x^s). - Petros Hadjicostas, Dec 07 2017
a(n) ~ 2^(n-1). - Vaclav Kotesovec, Feb 07 2019
a(n) = Sum_{k=1..n} 2^(gcd(k, n) - 1). - Seiichi Manyama, Apr 17 2021
a(n) = Sum_{k=1..n} 2^(n/gcd(n,k) - 1)*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 06 2021
Comments