login
A034754
Dirichlet convolution of 3^(n-1) with phi(n).
7
1, 4, 11, 32, 85, 260, 735, 2224, 6585, 19780, 59059, 177472, 531453, 1595076, 4783175, 14351168, 43046737, 129147252, 387420507, 1162281440, 3486785925, 10460412292, 31381059631, 94143360944, 282429536825, 847289140932
OFFSET
1,2
LINKS
FORMULA
a(n) ~ 3^(n-1). - Vaclav Kotesovec, Sep 11 2019
G.f.: Sum_{k>=1} phi(k) * x^k / (1 - 3*x^k). - Ilya Gutkovskiy, Feb 14 2020
a(n) = Sum_{k=1..n} 3^(gcd(k, n) - 1) = A054610(n)/3. - Seiichi Manyama, Apr 17 2021
a(n) = Sum_{k=1..n} 3^(n/gcd(n,k) - 1)*phi(gcd(n,k))/phi(n/gcd(n,k)). - Richard L. Ollerton, May 06 2021
MATHEMATICA
Table[Sum[3^(n/d - 1)*EulerPhi[d], {d, Divisors[n]}], {n, 1, 30}] (* Vaclav Kotesovec, Sep 10 2019 *)
PROG
(PARI) a(n) = sum(k=1, n, 3^(gcd(k, n)-1)); \\ Seiichi Manyama, Apr 17 2021
(PARI) a(n) = sumdiv(n, d, eulerphi(n/d)*3^(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-3*x^k))) \\ Seiichi Manyama, Apr 17 2021
CROSSREFS
KEYWORD
nonn
STATUS
approved