|
|
A162318
|
|
A positive integer n is included if |d(n+1)-d(n)| = 2, where d(n) is the number of divisors of n.
|
|
2
|
|
|
5, 6, 7, 10, 13, 20, 22, 27, 32, 37, 45, 46, 50, 51, 58, 61, 62, 68, 73, 74, 76, 82, 91, 92, 106, 115, 117, 123, 124, 146, 152, 153, 157, 164, 166, 170, 174, 178, 187, 188, 193, 206, 212, 226, 235, 236, 245, 261, 262, 267, 272, 274, 277, 278, 284, 291, 313, 325
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|