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.

A247015 Number of integers x smaller than n and that satisfy sigma(x)/x > sigma(n)/n where sigma is the sum of divisors.

Original entry on oeis.org

0, 0, 1, 0, 3, 0, 5, 1, 4, 2, 9, 0, 11, 5, 6, 2, 15, 1, 17, 2, 10, 9, 21, 0, 16, 11, 15, 4, 27, 1, 29, 7, 19, 16, 22, 0, 35, 18, 24, 4, 39, 4, 41, 12, 16, 23, 45, 0, 35, 15, 32, 14, 51, 7, 37, 9, 36, 29, 57, 0, 59, 31, 24, 14, 45, 9, 65, 22, 44, 13, 69, 1, 71
Offset: 1

Views

Author

Michel Marcus, Sep 09 2014

Keywords

Examples

			a(2) = 0, since below 2 no x have sigma(x)/x greater than sigma(2)/2.
a(3) = 1, since below 3 only sigma(2)/2 is greater than sigma(3)/3.
		

Crossrefs

Cf. A000203 (sigma), A017665 and A017666 (sigma(n)/n).

Programs

  • Mathematica
    r[n_] := r[n] := DivisorSigma[1,n]/n; a[n_] := Module[{rn = r[n]}, Count[Range[n-1], ?(r[#] > rn &)]]; Array[a, 73] (* _Amiram Eldar, Jul 01 2019 *)
  • PARI
    lista(nn) = {v = vector(nn, n, sigma(n)/n); for (n=1, nn, nb = sum(i=1, n, v[i] > v[n]); print1(nb, ", "););}

Formula

a(n) = 0 if and only if n is superabundant (A004394).
a(p) = p - 2, for p prime.