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.

A105086 Sum of the divisors of n minus the least nontrivial proper divisor of n.

Original entry on oeis.org

1, 1, 5, 1, 10, 1, 13, 10, 16, 1, 26, 1, 22, 21, 29, 1, 37, 1, 40, 29, 34, 1, 58, 26, 40, 37, 54, 1, 70, 1, 61, 45, 52, 43, 89, 1, 58, 53, 88, 1, 94, 1, 82, 75, 70, 1, 122, 50, 91, 69, 96, 1, 118, 67, 118, 77, 88, 1, 166, 1, 94, 101, 125, 79, 142, 1, 124, 93, 142, 1, 193, 1, 112
Offset: 2

Views

Author

Toby Donaldson (tjd(AT)sfu.ca), Apr 07 2005

Keywords

Comments

a(n) = 1 iff n is prime.

Examples

			a(6) = 10 because sigma(6) = 1 + 2 + 3 + 6 = 12, least nontrivial proper divisor(6) = 2 and their difference is 10.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSigma[1, n] - Divisors[n][[2]]
  • PARI
    a(n)=sigma(n) - divisors(n)[2] \\ Charles R Greathouse IV, Dec 10 2019

Formula

a(n) = sigma(n) - least nontrivial proper divisor(n).
a(n) = A000203(n) - A020639(n), n >= 2. - Omar E. Pol, Dec 08 2019

Extensions

Edited and extended by Robert G. Wilson v, Apr 08 2005
Offset changed by Charles R Greathouse IV, Dec 10 2019