login

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”).

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
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,1
FORMULA
Union of the terms of A138046 and A005237.
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 *)
CROSSREFS
Sequence in context: A187261 A101398 A131221 * A005237 A140578 A052213
KEYWORD
nonn
AUTHOR
Leroy Quet, Mar 02 2008
EXTENSIONS
More terms from Stefan Steinerberger and Emeric Deutsch, Mar 03 2008
More terms from R. J. Mathar, Mar 31 2008
STATUS
approved