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.

A061020 Negate primes in factorizations of divisors of n, then sum.

Original entry on oeis.org

1, -1, -2, 3, -4, 2, -6, -5, 7, 4, -10, -6, -12, 6, 8, 11, -16, -7, -18, -12, 12, 10, -22, 10, 21, 12, -20, -18, -28, -8, -30, -21, 20, 16, 24, 21, -36, 18, 24, 20, -40, -12, -42, -30, -28, 22, -46, -22, 43, -21, 32, -36, -52, 20, 40, 30, 36, 28, -58, 24, -60, 30, -42, 43, 48, -20, -66, -48, 44, -24, -70, -35
Offset: 1

Views

Author

Marc LeBrun, Apr 13 2001

Keywords

Comments

Analog of sigma function A000203(n) with primes negated.
Unsigned sequence |a(n)| (A206369) gives the number of numbers 1 <= k <= n for which GCD(k,n) is a square. |a(n)| = Sum_{d|n} d*(-1)^bigomega(n/d). - Vladeta Jovovic, Dec 29 2002

Examples

			a(12) = 1-2-3+4+6-12 = (1-2+4)*(1-3) = -6.
		

Crossrefs

Programs

  • Haskell
    a061020 = sum . map a061019 . a027750_row
    -- Reinhard Zumkeller, Feb 08 2012
  • Maple
    with(numtheory):
    A061020 := proc(n) local d; add(d*(-1)^bigomega(d), d=divisors(n)) end:
    seq(A061020(n), n=1..72); # Peter Luschny, Aug 29 2013
  • Mathematica
    nmax = 72; Drop[ CoefficientList[ Series[ Sum[ LiouvilleLambda[k] k x^k/(1 - x^k), {k, 1, nmax} ], {x, 0, nmax} ], x ], 1 ] (* Stuart Clary, Apr 15 2006, updated by Jean-François Alcover, Dec 04 2017 *)
    f[p_, e_] := ((-p)^(e+1)-1)/(-p-1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 24 2023 *)
  • PARI
    for(n=1,100,print1(sumdiv(n,d,(d)*moebius(core(d))),","))
    
  • PARI
    a(n)=if(n<1,0,direuler(p=2,n,1/(1-X)/(1+p*X))[n]) \\ Ralf Stephan
    
  • PARI
    A061020(n) = {my(f=factorint(n)); prod(k=1, #f[,2], ((-f[k,1])^(f[k,2]+1)-1)/(-f[k,1]-1))} \\ Andrew Lelechenko, Apr 22 2014
    

Formula

Replace each divisor d of n by A061019[d] and sum. Replace p^q with (1-(-p)^(q+1))/(1+p) in prime factorization of n.
Inverse mobius transform of A061019. In other words a(n) = Sum_{d|n} d*(-1)^bigomega(d), where bigomega(n) = A001222(n).
a(n) = Sum_{d|n} d*mu(core(d)) where core(x) = A007913(x) is the smallest number such that x*core(x) is a square. - Benoit Cloitre, Apr 07 2002
G.f.: A(x) = Sum_{k>=1} lambda(k)*k*x^k/(1 - x^k) where lambda(k) is the Liouville function, A008836. - Stuart Clary, Apr 15 2006
G.f.: A(x) is x times the logarithmic derivative of A118206(x). - Stuart Clary, Apr 15 2006
Dirichlet g.f.: zeta(s)*zeta(2 s - 2)/zeta(s - 1). - Stuart Clary, Apr 15 2006
a(n) = Sum_{d|n} d*lambda(d), where lambda(n) is A008836(n). - Enrique Pérez Herrero, Aug 29 2013