OFFSET
2,7
FORMULA
a(n) = n mod (tau(n) - 1), for n>1.
MAPLE
[ seq( i mod (tau(i) - 1), i=2..150) ];
MATHEMATICA
Table[Mod[n, DivisorSigma[0, n]-1], {n, 2, 110}] (* Harvey P. Dale, Dec 05 2015 *)
PROG
(PARI) a(n) = n % (numdiv(n) - 1); \\ Michel Marcus, Nov 21 2019
(Python)
from sympy import divisor_count
def A054009(n): return n%(divisor_count(n)-1) # Chai Wah Wu, Mar 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Asher Auel, Jan 12 2000
STATUS
approved