cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A343490 a(n) = Sum_{k=1..n} 4^(gcd(k, n) - 1).

Original entry on oeis.org

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

Views

Author

Seiichi Manyama, Apr 17 2021

Keywords

Crossrefs

Column 4 of A343489.

Programs

  • 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 *)
  • 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)))

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).