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”).
%I #15 Jun 13 2018 23:07:09
%S 1,2,6,64,121,128,131,196,65536,65541,65572,117649,262144,262148,
%T 262192,279841,287296,287299,287744,292681,4194304,4194319,4194325,
%U 70368744177664,2384185791015625,2384185791015648,2384185791085568
%N a(1)=1. a(n) = the smallest integer > a(n-1) such that |d(a(n)) - d(a(n-1))| = n-1, where d(m) = the number of positive divisors of m.
%C a(24) > 1400000000. - _Robert G. Wilson v_, Jun 06 2008
%C If n-1 >= d(a(n-1)), then d(a(n)) must be n-1 + d(a(n-1)).
%H Ray Chandler, <a href="/A139695/b139695.txt">Table of n, a(n) for n=1..89</a>
%p A139695 := proc(n) option remember ; local a,aprev; if n = 1 then 1; else aprev := A139695(n-1) ; for a from aprev+1 do if abs(numtheory[tau](a)-numtheory[tau](aprev)) = n-1 then RETURN(a) ; fi ; od: fi ; end: for n from 1 do print(A139695(n)) ; od: # _R. J. Mathar_, May 04 2008
%t f[1] = 1; f[n_] := f[n] = Block[{da = DivisorSigma[0, f[n - 1]], k = f[n - 1] + 1}, While[ Abs[ DivisorSigma[0, k] - da] + 1 != n, k++; m = k]; k]; Do[ Print[{n, f@n}], {n, 50}]
%Y Cf. A139696.
%K nonn
%O 1,2
%A _Leroy Quet_, Apr 29 2008, Jun 14 2008
%E a(10)-a(20) from _R. J. Mathar_, May 04 2008
%E a(21)-a(23) from _Robert G. Wilson v_, Jun 05 2008
%E a(24)-a(27) from _Ray Chandler_, Jul 08 2009