cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A036538 #45 Feb 24 2024 11:04:54
%S A036538 2,3,7,12,23,45,89,178,356,707,1409,2822,5639,11273,22546,45088,90165,
%T A036538 180315,360637,721258,1442491,2884973,5769941,11539858,23079721,
%U A036538 46159395,92318705,184637321,369274467,738548867,1477097749,2954195452,5908390605,11816780739
%N A036538 Number of integers m <= 2^n such that d(m) = 2^k for some k = 0, 1, 2, 3, ...
%C A036538 a(n+1)/a(n) is very close to 2; a(n)/2^n is near 0.7.
%C A036538 As n goes to infinity, lim a(n)/2^n = 0.687827... (A327839; see comments in A036537). - _Vladimir Shevelev_, Feb 28 2017
%F A036538 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 A036538 Of the numbers 1 .. 2^4 = 16, only 4, 9, 12 and 16 are not in A036537, so a(4) = 16 - 4 = 12.
%p A036538 IversonBrackets := expr -> subs(true=1, false=0, expr):
%p A036538 A := proc(n) option remember; {seq(2^k, k=0..n)} end:
%p A036538 h := proc(n) option remember; add(evalb(numtheory:-tau(j) in A(n)), j=2^(n-1) + 1..2^n); IversonBrackets(%) end:
%p A036538 a := n -> 1 + add(h(k), k=1..n); seq(a(n), n=1..17); # _Peter Luschny_, May 14 2018
%t A036538 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 A036538 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 A036538 (PARI) a(n) = sum(k=1, 2^n, d = numdiv(k); (d<=2) || (ispower(d,,&p) && (p==2))); \\ _Michel Marcus_, May 14 2018
%o A036538 (Python)
%o A036538 from sympy import factorint
%o A036538 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 A036538 Cf. A000005, A036537, A036539, A037992, A327839.
%K A036538 nonn
%O A036538 1,1
%A A036538 _Labos Elemer_
%E A036538 a(20)-a(26) from _Michael De Vlieger_, Feb 28 2017
%E A036538 a(27)-a(34) from _Giovanni Resta_, May 14 2018