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.

A178450 Dirichlet inverse of A034448 (unitary sigma).

Original entry on oeis.org

1, -3, -4, 4, -6, 12, -8, -6, 6, 18, -12, -16, -14, 24, 24, 8, -18, -18, -20, -24, 32, 36, -24, 24, 10, 42, -12, -32, -30, -72, -32, -12, 48, 54, 48, 24, -38, 60, 56, 36, -42, -96, -44, -48, -36, 72, -48, -32, 14, -30, 72, -56, -54, 36, 72, 48, 80, 90, -60, 96, -62, 96, -48, 16, 84, -144, -68, -72, 96, -144
Offset: 1

Views

Author

R. J. Mathar, Dec 22 2010

Keywords

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes
    a n = product . map (\(p, e) -> if even e then 2*unPrime p^(e`div`2) else -(unPrime p+1)*unPrime p^(e`div`2)) $ factorise n -- Sebastian Karlsson, Dec 04 2021
  • Mathematica
    usigma[n_] := If[n==1, 1, Times @@ (1 + Power @@@ FactorInteger[n])];
    a[n_] := a[n] = If[n==1, 1, -Sum[usigma[n/d] a[d], {d, Most@Divisors[n]}]];
    Array[a, 70] (* Jean-François Alcover, Feb 16 2020 *)
    f[p_, e_] := If[OddQ[e], -(p+1)*p^((e-1)/2), 2*p^(e/2)]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 24 2023 *)
  • PARI
    seq(n)={dirdiv(vector(n, n, n==1), vector(n, n, sumdivmult(n, d, if(gcd(d, n/d)==1, d))))} \\ Andrew Howroyd, Aug 05 2018
    
  • PARI
    A178450(n) = { my(f=factor(n)); prod(i=1, #f~, if(!(f[i,2]%2), 2*(f[i, 1]^(f[i, 2]/2)), -(1+f[i,1])*(f[i, 1]^((f[i, 2]-1)/2)))); }; \\ (After the multiplicative formula) - Antti Karttunen, Nov 26 2024
    

Formula

Dirichlet g.f.: zeta(2s-1)/(zeta(s)*zeta(s-1)). - R. J. Mathar, Apr 14 2011
Multiplicative with a(p^e) = 2*p^(e/2) if e is even, -(p+1)*p^((e-1)/2) if e is odd. - Sebastian Karlsson, Dec 04 2021