OFFSET
0,3
LINKS
Michel Marcus and Giovanni Resta, Table of n, a(n) for n = 0..244 (terms up to a(106) from Michel Marcus)
EXAMPLE
10 and 12 have respectively 4 and 6 divisors, that is, 12-10 = 6-4, so a(2)=10.
9 and 12 have respectively 3 and 6 divisors, that is, 12-9 = 6-3, so a(3)=9.
MAPLE
f:= proc(n) local k;
for k from 1 do
if numtheory:-tau(k+n)=numtheory:-tau(k)+n then return k fi
od
end proc:
map(f, [$0..50]); # Robert Israel, May 28 2018
MATHEMATICA
Array[Block[{k = 1}, While[DivisorSigma[0, k + #] != DivisorSigma[0, k] + #, k++]; k] &, 40, 0] (* Michael De Vlieger, May 27 2018 *)
PROG
(PARI) a(n) = {my(k=1); while(numdiv(k+n) != numdiv(k) + n, k++); k; }
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, May 27 2018
STATUS
approved