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.

A033272 Number of odd nonprimes dividing n.

Original entry on oeis.org

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

Views

Author

Keywords

Crossrefs

Cf. A001227 (with odd divisors), A005087, A033273 (with nonprime divisors).

Programs

  • Mathematica
    Table[Length[Select[Divisors[n],OddQ[#]&&!PrimeQ[#]&]],{n,80}] (* Harvey P. Dale, May 06 2012 *)
    a[n_] := DivisorSigma[0, n/2^IntegerExponent[n, 2]] - PrimeNu[n] + If[OddQ[n], 0, 1]; Array[a, 100] (* Amiram Eldar, Jul 01 2022 *)
  • PARI
    a(n) = sumdiv(n, d, (d%2) && !isprime(d)); \\ Michel Marcus, May 05 2017

Formula

a(n) = A001227(n) - A005087(n). - Amiram Eldar, Jul 01 2022