A138047 Positive integers n such that (d(n+1) - d(n)) * (-1)^n is nonnegative, where d(n) = the number of positive divisors of n.
2, 14, 21, 26, 33, 34, 38, 44, 45, 57, 62, 74, 75, 81, 85, 86, 93, 94, 98, 104, 105, 116, 117, 118, 122, 133, 134, 135, 141, 142, 145, 146, 147, 158, 164, 165, 171, 177, 188, 189, 194, 201, 202, 205, 206, 213, 214, 217, 218, 225, 230, 231, 242, 243, 244, 253
Offset: 1
Keywords
Programs
-
Maple
with(numtheory): a:=proc(n) if 0<=(-1)^n*(tau(n+1)-tau(n)) then n else end if end proc: seq(a(n),n=1..240); # Emeric Deutsch, Mar 06 2008 A051950 := proc(n) numtheory[tau](n)-numtheory[tau](n+1) ; end: A138047 := proc(n) option remember ; local a; if n = 1 then 2 ; else for a from A138047(n-1)+1 do if (-1)^a*A051950(a+1) >= 0 then RETURN(a) ; fi ; od: fi ; end: seq(A138047(n),n=1..80) ; # R. J. Mathar, Mar 31 2008
-
Mathematica
Select[Range[500], (DivisorSigma[0, # + 1] - DivisorSigma[0, # ])*(-1)^# > -1 &] (* Stefan Steinerberger, Mar 03 2008 *)
Extensions
More terms from Stefan Steinerberger and Emeric Deutsch, Mar 03 2008
More terms from R. J. Mathar, Mar 31 2008