OFFSET
1,6
COMMENTS
a(n)=0 iff n is a refactorable number (cf. A033950). - Franz Vrabec, Oct 16 2005
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = n mod tau(n).
MAPLE
[ seq( i mod tau(i), i=1..130) ];
MATHEMATICA
a[n_] := Mod[n, DivisorSigma[0, n]]; Array[a, 105] (* Jean-François Alcover, Sep 19 2017 *)
PROG
(Haskell)
a054008 n = n `mod` a000005 n -- Reinhard Zumkeller, Sep 17 2014
(PARI) a(n) = n % numdiv(n); \\ Michel Marcus, Sep 19 2017
(Python)
from sympy import divisor_count
def A054008(n): return n%divisor_count(n) # Chai Wah Wu, Mar 14 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Asher Auel, Jan 12 2000
STATUS
approved