A065559 Smallest k such that tau(n+k) = tau(k).
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, 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, 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
Offset: 1
Keywords
Links
- Harry J. Smith, Table of n, a(n) for n = 1..1000
- Eric Weisstein's World of Mathematics, Divisor Function
Crossrefs
Cf. A000005.
Programs
-
Maple
with(numtheory): a:= proc(n) local k; for k while tau(n+k)<>tau(k) do od; k end: seq(a(n), n=1..120); # Alois P. Heinz, Mar 18 2013
-
Mathematica
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 *) skt[n_]:=Module[{k=1},While[DivisorSigma[0,k]!=DivisorSigma[0,n+k], k++]; k]; Array[skt,100] (* Harvey P. Dale, Oct 13 2017 *)
-
PARI
tau(m) = {local(k, n); for(k=1,m,n=1; while(numdiv(n)!=numdiv(n+k), n++); print1(n,","))} tau(200)
-
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