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.

A087802 a(n) = Sum_{d|n, d nonprime} mu(d), where mu = A008683.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 1, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3, 1, 2, 2, 2, 1, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 3, 1, 2, 2, 1, 2, 3, 1, 2, 2, 3, 1, 2, 1, 2, 2, 2, 2, 3, 1, 2, 1, 2, 1, 3, 2, 2, 2, 2, 1, 3, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 1, 3
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 11 2003

Keywords

Comments

A064372 and this sequence first differ at term 64: A064372(64)=2 and a(64)=1. - Rick L. Shepherd, Mar 07 2004

Examples

			Divisors of n=42: {1,2,3,6,7,14,21,42}, a(42) = mu(1) + mu(6) + mu(14) + mu(21) + mu(42) = 1+1+1+1-1 = 3.
		

Crossrefs

Cf. A001221, A008683 (mu), A023890, A033273. Different from A079553.

Programs

  • Mathematica
    Table[Total[MoebiusMu[#]&/@Select[Divisors[n],!PrimeQ[#]&]],{n,120}] (* Harvey P. Dale, Oct 14 2014 *)
  • PARI
    A087802(n) = sumdiv(n,d,if(!isprime(d),moebius(d)))

Formula

a(n) = if n=1 then 1, else A001221(n). - Vladeta Jovovic, Oct 17 2003