OFFSET
2,3
COMMENTS
a(n) = 1 iff n is prime.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 2..10000
FORMULA
a(n) = sigma(n) - least nontrivial proper divisor(n).
EXAMPLE
a(6) = 10 because sigma(6) = 1 + 2 + 3 + 6 = 12, least nontrivial proper divisor(6) = 2 and their difference is 10.
MATHEMATICA
a[n_] := DivisorSigma[1, n] - Divisors[n][[2]]
PROG
(PARI) a(n)=sigma(n) - divisors(n)[2] \\ Charles R Greathouse IV, Dec 10 2019
CROSSREFS
KEYWORD
nonn
AUTHOR
Toby Donaldson (tjd(AT)sfu.ca), Apr 07 2005
EXTENSIONS
Edited and extended by Robert G. Wilson v, Apr 08 2005
Offset changed by Charles R Greathouse IV, Dec 10 2019
STATUS
approved