[go: up one dir, main page]

login
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