OFFSET
1,3
COMMENTS
Least positive k such that d(n) = d(n+k), or 0 if no such k exists (d = A000005). - Altug Alkan, Jul 29 2016
LINKS
Michael De Vlieger, Table of n, a(n) for n = 1..10001
N. J. A. Sloane, Transforms
FORMULA
a(n) = A079427(n) - n. - Ridouane Oudra, Sep 14 2021
MATHEMATICA
{0}~Join~Array[Block[{k = 1}, While[DivisorSigma[0, #] != DivisorSigma[0, # + k], k++]; k] &, 94, 2] (* Michael De Vlieger, Aug 19 2021 *)
PROG
(PARI) a(n) = if (n==1, 0, my(m=1, nd=numdiv(n)); while(numdiv(n+m) != nd, m++); m); \\ Michel Marcus, Sep 14 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Oct 24 2010
STATUS
approved