login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
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
Sequence in context: A177089 A206415 A162317 * A350593 A108910 A308193
KEYWORD
nonn
AUTHOR
Leroy Quet, Jul 01 2009
EXTENSIONS
Extended by Emeric Deutsch, Jul 12 2009
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)