login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A343490
a(n) = Sum_{k=1..n} 4^(gcd(k, n) - 1).
2
1, 5, 18, 70, 260, 1050, 4102, 16460, 65574, 262420, 1048586, 4195500, 16777228, 67112990, 268436040, 1073758360, 4294967312, 17179936830, 68719476754, 274878169880, 1099511636076, 4398047559730, 17592186044438, 70368748407000, 281474976711700, 1125899923619900
OFFSET
1,2
LINKS
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
Column 4 of A343489.
Sequence in context: A164051 A134764 A188177 * A302077 A322773 A145780
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Apr 17 2021
STATUS
approved