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!)
A230115 Numbers n such that tau(n+1) - tau(n) = 2; where tau(n) = the number of divisors of n (A000005). 6

%I #26 Dec 06 2019 15:49:36

%S 5,7,13,27,37,51,61,62,73,74,91,115,123,146,153,157,164,187,188,193,

%T 206,235,245,267,274,277,278,284,291,313,355,356,362,369,386,397,403,

%U 411,421,422,423,425,427,428,451,457,538,541,605,613,637,657,661,667,673

%N Numbers n such that tau(n+1) - tau(n) = 2; where tau(n) = the number of divisors of n (A000005).

%C Numbers n such that A051950(n+1) = 2.

%C Numbers n such that A049820(n) - A049820(n+1) = 1.

%C Sequence of starts of first run of n (n>=2) consecutive integers m_1, m_2, ..., m_n such that tau(m_k) - tau(m_k-1) = 2, for all k=n...2: 5, 61, 421, ... (a(5) > 100000); example for n=4: tau(421) = 2, tau(422) = 4, tau(423) = 6, tau(424) = 8.

%H Jaroslav Krizek, <a href="/A230115/b230115.txt">Table of n, a(n) for n = 1..2000</a>

%e Number 7 is in sequence because tau(8) - tau(7) = 4 - 2 = 2.

%t Select[ Range[ 50000], DivisorSigma[0, # ] + 2 == DivisorSigma[0, # + 1] &]

%t Flatten[Position[Partition[DivisorSigma[0,Range[700]],2,1],_? (#[[2]]- #[[1]] == 2&),{1},Heads->False]] (* _Harvey P. Dale_, Aug 03 2014 *)

%o (PARI) isok(n) = (numdiv(n+1) - numdiv(n)) == 2; \\ _Michel Marcus_, Mar 26 2017

%o (Python)

%o from sympy.ntheory import divisor_count

%o [n for n in range(1000) if divisor_count(n + 1) - divisor_count(n) == 2] # _Indranil Ghosh_, Mar 26 2017

%Y Cf. A000005, A055927 (numbers n such that tau(n+1) - tau(n) = 1).

%Y Subsequence of A162318. - _Michel Marcus_, Mar 26 2017

%K nonn

%O 1,1

%A _Jaroslav Krizek_, Oct 09 2013

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 25 09:28 EDT 2024. Contains 371967 sequences. (Running on oeis4.)