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.

A101035 Dirichlet inverse of the gcd-sum function (A018804).

Original entry on oeis.org

1, -3, -5, 1, -9, 15, -13, 1, 4, 27, -21, -5, -25, 39, 45, 1, -33, -12, -37, -9, 65, 63, -45, -5, 16, 75, 4, -13, -57, -135, -61, 1, 105, 99, 117, 4, -73, 111, 125, -9, -81, -195, -85, -21, -36, 135, -93, -5, 36, -48, 165, -25, -105, -12, 189, -13, 185, 171, -117, 45, -121, 183, -52, 1, 225, -315, -133, -33, 225, -351, -141, 4
Offset: 1

Views

Author

Gerard P. Michon, Nov 27 2004

Keywords

Examples

			a(4)=1, a(8)=1, a(16)=1, a(32)=1, etc. because of the multiplicative definition for powers of 2.
		

Crossrefs

Programs

  • Haskell
    a101035 n = product $ zipWith f (a027748_row n) (a124010_row n) where
       f p 1 = 1 - 2 * p
       f p e = (p - 1) ^ 2
    -- Reinhard Zumkeller, Jul 16 2012
    
  • Mathematica
    DirichletInverse[f_][1] = 1/f[1]; DirichletInverse[f_][n_] := DirichletInverse[f][n] = -1/f[1]*Sum[ f[n/d]*DirichletInverse[f][d], {d, Most[ Divisors[n]]}]; GCDSum[n_] := Sum[ GCD[n, k], {k, 1, n}]; Table[ DirichletInverse[ GCDSum][n], {n, 1, 72}](* Jean-François Alcover, Dec 12 2011 *)
    f[p_, e_] := If[e == 1, 1 - 2*p, (p - 1)^2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 06 2022 *)
  • PARI
    seq(n)={dirdiv(vector(n, n, n==1), vector(n, n, sumdiv(n, d, n*eulerphi(d)/d)))} \\ Andrew Howroyd, Aug 05 2018
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, (1 - p*X)^2/(1 - X))[n], ", ")) \\ Vaclav Kotesovec, Aug 22 2021

Formula

Multiplicative function with a(p)=1-2p and a(p^e)=(p-1)^2 when e>1 [p prime].
Dirichlet g.f.: zeta(s)/zeta^2(s-1). - R. J. Mathar, Apr 10 2011
a(n) = Sum{d|n} tau_{-2}(d)*d, where tau_{-2} is A007427. - Enrique Pérez Herrero, Jan 19 2013
Conjecture: Logarithmic g.f. Sum_{n>0,k>0} mu(n)*mu(k)*log(1/(1-x^(n*k))). - Benedict W. J. Irwin, Jul 26 2017