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.

A072628 Number of divisors d of n such that d-1 is not prime.

Original entry on oeis.org

1, 2, 1, 2, 2, 2, 2, 2, 2, 4, 2, 2, 2, 3, 3, 3, 2, 3, 2, 4, 3, 4, 2, 2, 3, 4, 3, 4, 2, 5, 2, 3, 3, 4, 4, 4, 2, 3, 3, 5, 2, 4, 2, 4, 5, 4, 2, 3, 3, 6, 3, 5, 2, 4, 4, 5, 3, 4, 2, 5, 2, 3, 5, 4, 4, 6, 2, 4, 3, 7, 2, 4, 2, 3, 5, 4, 4, 6, 2, 6, 4, 4, 2, 5, 4, 4, 3, 5, 2, 7, 4, 5, 3, 4, 4, 4, 2, 4, 5, 7, 2, 5, 2, 5, 7
Offset: 1

Views

Author

Labos Elemer, Jun 28 2002

Keywords

Examples

			If n = p is prime then divisors - 1 = {1, p} - 1 = {0, p-1} so a(p) = 2 if p <> 3.
240 has 20 divisors, of them 8 divisors d have nonprime value of d-1, {0, 1, 4, 9, 14, 15, 39, 119}, so a(240) = 8.
		

Crossrefs

Programs

  • Mathematica
    di[x_] := Divisors[x]; dp[x_] := Part[di[x], Flatten[Position[PrimeQ[ -1+di[x]], True]]]-1; Table[DivisorSigma[0, w]-Length[dp[w]], {w, 1, 128}]
    a[n_] := DivisorSum[n, 1 &, !PrimeQ[#-1] &]; Array[a, 100] (* Amiram Eldar, Apr 13 2024 *)
  • PARI
    a(n) = sumdiv(n, d, !isprime(d-1)); \\ Amiram Eldar, Apr 13 2024

Formula

a(n) = A000005(n) - A072627(n) < A000005(n).