OFFSET
1,1
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
68 is included because |d(69)-d(68)| = |4 - 6| = 2. [Emeric Deutsch, Jul 12 2009]
MAPLE
with(numtheory): a := proc (n) if abs(tau(n+1)-tau(n)) = 2 then n else end if end proc; seq(a(n), n = 1 .. 350); # Emeric Deutsch, Jul 12 2009
MATHEMATICA
Select[Range[500], Abs[DivisorSigma[0, # + 1] - DivisorSigma[0, #]] == 2 &] (* Indranil Ghosh, Mar 26 2017 *)
Position[Abs[Differences[DivisorSigma[0, Range[350]]]], 2]//Flatten (* Harvey P. Dale, Aug 14 2017 *)
PROG
(PARI) isok(n) = abs(numdiv(n+1) - numdiv(n)) == 2; \\ Michel Marcus, Mar 26 2017
(Python)
from sympy import divisor_count
print([n for n in range(500) if abs(divisor_count(n + 1) - divisor_count(n)) == 2]) # Indranil Ghosh, Mar 26 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 01 2009
EXTENSIONS
Extended by Emeric Deutsch, Jul 12 2009
STATUS
approved