Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #27 Dec 15 2017 17:35:44
%S 2,3,2,3,2,5,8,3,2,3,2,5,8,3,2,3,2,5,8,3,2,7,10,5,8,3,2,3,2,7,8,5,6,3,
%T 2,5,14,3,2,3,2,5,8,3,2,7,8,5,6,3,2,6,21,5,10,3,2,3,2,7,8,5,6,3,2,5,
%U 10,3,2,3,2,7,14,5,10,3,2,5,6,3,2,7,8,5,6,3,2,6,6,7,15,5,22,3,2,5,14,3,2
%N Smallest k such that tau(n+k) = tau(k).
%H Harry J. Smith, <a href="/A065559/b065559.txt">Table of n, a(n) for n = 1..1000</a>
%H Eric W. Weisstein, <a href="http://mathworld.wolfram.com/DivisorFunction.html">MathWorld: Divisor Function</a>
%p with(numtheory):
%p a:= proc(n) local k; for k while tau(n+k)<>tau(k) do od; k end:
%p seq(a(n), n=1..120); # _Alois P. Heinz_, Mar 18 2013
%t tau[m_] := DivisorSigma[0, m]; a[n_] := Catch[ For[k = 1, True, k++, If[ tau[n+k] == tau[k], Throw[k]]]]; Table[a[n], {n, 1, 99}] (* _Jean-François Alcover_, Mar 18 2013 *)
%t skt[n_]:=Module[{k=1},While[DivisorSigma[0,k]!=DivisorSigma[0,n+k], k++]; k]; Array[skt,100] (* _Harvey P. Dale_, Oct 13 2017 *)
%o (PARI): tau(m) = {local(k, n); for(k=1,m,n=1; while(numdiv(n)!=numdiv(n+k), n++); print1(n,","))} tau(200)
%o (PARI) { for (n=1, 1000, k=1; while(numdiv(n + k) != numdiv(k), k++); write("b065559.txt", n, " ", k) ) } \\ _Harry J. Smith_, Oct 22 2009
%Y Cf. A000005.
%K nonn
%O 1,1
%A _Jason Earls_, Nov 29 2001