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!)
A138046 Positive integers k such that (d(k+1) - d(k)) * (-1)^k is positive, where d(k) = the number of positive divisors of k. 4

%I #26 May 13 2023 17:13:18

%S 45,62,74,81,105,117,134,146,164,165,188,194,206,225,254,261,273,274,

%T 278,284,297,314,315,325,333,345,356,357,362,385,386,398,404,405,422,

%U 428,435,441,454,458,465,477,482,494,495,513,524,525,538,554,555,561

%N Positive integers k such that (d(k+1) - d(k)) * (-1)^k is positive, where d(k) = the number of positive divisors of k.

%C The number of terms < 10^m, for m >= 1: 0, 4, 104, 1320, 15000, 162705, ..., . The smallest term which is the beginning of n consecutive terms: 45, 164, 625, 2274, 30481, 150992, 624963, 726421, ..., . - _Robert G. Wilson v_, Mar 23 2008

%H Muniru A Asiru, <a href="/A138046/b138046.txt">Table of n, a(n) for n = 1..10000</a>

%p 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..500); # _Emeric Deutsch_, Mar 06 2008

%p A051950 := proc(n) numtheory[tau](n)-numtheory[tau](n-1) ; end: A138046 := proc(n) option remember ; local a; if n = 1 then 45 ; else for a from A138046(n-1)+1 do if (-1)^a*A051950(a+1) > 0 then RETURN(a) ; fi ; od: fi ; end: seq(A138046(n),n=1..80) ; # _R. J. Mathar_, Mar 31 2008

%t f[n_] := (DivisorSigma[0, n + 1] - DivisorSigma[0, n])*(-1)^n; Select[ Range@ 565, f@# > 0 &] (* _Robert G. Wilson v_, Mar 23 2008 *)

%o (GAP) Filtered([1..1000],n->IsPosInt((Tau(n+1)-Tau(n))*(-1)^n)); # _Muniru A Asiru_, May 27 2018

%o (PARI) isok(n) = (numdiv(n+1) - numdiv(n))*(-1)^n > 0; \\ _Michel Marcus_, May 27 2018

%Y Cf. A138047.

%K nonn

%O 1,1

%A _Leroy Quet_, Mar 02 2008

%E More terms from _Emeric Deutsch_, Mar 06 2008

%E More terms from _R. J. Mathar_ and _Robert G. Wilson v_, Mar 23 2008

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 23 19:56 EDT 2024. Contains 371916 sequences. (Running on oeis4.)