OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..1660
FORMULA
a(n) = Sum_{d|n} phi(n/d)*4^(d - 1) = A054611(n)/4.
G.f.: Sum_{k>=1} phi(k) * x^k / (1 - 4*x^k).
MAPLE
N:= 30: # for a(1)..a(N)
G:= add(numtheory:-phi(k)*x^k/(1-4*x^k), k=1..N):
S:= series(G, x, N+1):
seq(coeff(S, x, j), j=1..N); # Robert Israel, Sep 11 2023
MATHEMATICA
a[n_] := Sum[4^(GCD[k, n] - 1), {k, 1, n}]; Array[a, 26] (* Amiram Eldar, Apr 17 2021 *)
PROG
(PARI) a(n) = sum(k=1, n, 4^(gcd(k, n)-1));
(PARI) a(n) = sumdiv(n, d, eulerphi(n/d)*4^(d-1));
(PARI) my(N=40, x='x+O('x^N)); Vec(sum(k=1, N, eulerphi(k)*x^k/(1-4*x^k)))
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Apr 17 2021
STATUS
approved