login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A054008
n read modulo (number of divisors of n).
5
0, 0, 1, 1, 1, 2, 1, 0, 0, 2, 1, 0, 1, 2, 3, 1, 1, 0, 1, 2, 1, 2, 1, 0, 1, 2, 3, 4, 1, 6, 1, 2, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 1, 2, 3, 2, 1, 8, 1, 2, 3, 4, 1, 6, 3, 0, 1, 2, 1, 0, 1, 2, 3, 1, 1, 2, 1, 2, 1, 6, 1, 0, 1, 2, 3, 4, 1, 6, 1, 0, 1, 2, 1, 0, 1, 2, 3, 0, 1, 6, 3, 2, 1, 2, 3, 0, 1, 2, 3, 1, 1, 6, 1, 0, 1
OFFSET
1,6
COMMENTS
a(n)=0 iff n is a refactorable number (cf. A033950). - Franz Vrabec, Oct 16 2005
a(A066708(n)) = n and a(m) < n for m < A066708(n). - Reinhard Zumkeller, Sep 17 2014
LINKS
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