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!)
A036538 Number of integers m <= 2^n such that d(m) = 2^k for some k = 0, 1, 2, 3, ... 3

%I #45 Feb 24 2024 11:04:54

%S 2,3,7,12,23,45,89,178,356,707,1409,2822,5639,11273,22546,45088,90165,

%T 180315,360637,721258,1442491,2884973,5769941,11539858,23079721,

%U 46159395,92318705,184637321,369274467,738548867,1477097749,2954195452,5908390605,11816780739

%N Number of integers m <= 2^n such that d(m) = 2^k for some k = 0, 1, 2, 3, ...

%C a(n+1)/a(n) is very close to 2; a(n)/2^n is near 0.7.

%C As n goes to infinity, lim a(n)/2^n = 0.687827... (A327839; see comments in A036537). - _Vladimir Shevelev_, Feb 28 2017

%F a(n) = number of 1s in f(tau(k)) mapped across k = 1..2^n, with f(x):= 1-sign(log_2 x - floor( log_2 x )). - _Michael De Vlieger_, Mar 01 2017

%e Of the numbers 1 .. 2^4 = 16, only 4, 9, 12 and 16 are not in A036537, so a(4) = 16 - 4 = 12.

%p IversonBrackets := expr -> subs(true=1, false=0, expr):

%p A := proc(n) option remember; {seq(2^k, k=0..n)} end:

%p h := proc(n) option remember; add(evalb(numtheory:-tau(j) in A(n)), j=2^(n-1) + 1..2^n); IversonBrackets(%) end:

%p a := n -> 1 + add(h(k), k=1..n); seq(a(n), n=1..17); # _Peter Luschny_, May 14 2018

%t Table[Count[#, 1] &@ Table[1 - Sign[# - Floor@ #] &@Log[2, #] &@ DivisorSigma[0, x], {x, 1, 2^m}], {m, 1, 20}] (* original program edited by _Michael De Vlieger_, Mar 01 2017, or *)

%t 1 + Accumulate@ Table[Count[Range[2^(n - 1) + 1, 2^n], k_ /; IntegerQ@ Log2@ DivisorSigma[0, k]], {n, 20}] (* _Michael De Vlieger_, Feb 28 2017 *)

%o (PARI) a(n) = sum(k=1, 2^n, d = numdiv(k); (d<=2) || (ispower(d,,&p) && (p==2))); \\ _Michel Marcus_, May 14 2018

%o (Python)

%o from sympy import factorint

%o def A036538(n): return sum(1 for m in range(1,(1<<n)+1) if all(map(lambda w:not((k:=w+1)&-k)^k, factorint(m).values()))) # _Chai Wah Wu_, Jun 22 2023

%Y Cf. A000005, A036537, A036539, A037992, A327839.

%K nonn

%O 1,1

%A _Labos Elemer_

%E a(20)-a(26) from _Michael De Vlieger_, Feb 28 2017

%E a(27)-a(34) from _Giovanni Resta_, May 14 2018

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 September 10 03:08 EDT 2024. Contains 375770 sequences. (Running on oeis4.)