%I #13 Dec 31 2023 03:40:41
%S 0,1,1,1,1,2,0,1,2,2,0,2,0,1,2,1,1,3,0,2,1,1,0,2,1,1,2,1,0,3,0,1,2,2,
%T 1,3,0,1,1,2,0,2,0,1,3,1,0,2,0,2,2,1,0,3,1,1,1,1,0,3,0,1,2,1,2,3,0,2,
%U 1,2,0,3,0,1,2,1,0,2,0,2,2,1,0,2,2,1,1,1,0,4,0,1,1,1,1,2,0,1,3,2,0,3,0,1,2
%N Number of divisors of n of the form 2^k + 1 for k >= 0.
%C a(n) is the number of terms of A000051 that divide n.
%H Antti Karttunen, <a href="/A305436/b305436.txt">Table of n, a(n) for n = 1..65537</a>
%F a(n) = Sum_{d|n} A209229(d-1).
%F a(n) = A305435(n) + A209229(n-1).
%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A323482 = 1.264499... . - _Amiram Eldar_, Dec 31 2023
%t Table[DivisorSum[n, 1 &, IntegerQ@ Log2[# - 1] &], {n, 105}] (* _Michael De Vlieger_, Jun 11 2018 *)
%o (PARI)
%o A209229(n) = (n && !bitand(n,n-1));
%o A305436(n) = sumdiv(n,d,A209229(d-1));
%Y Cf. A000051, A209229, A292315 (positions of zeros), A305435, A323482.
%Y Cf. also A154402.
%K nonn
%O 1,6
%A _Antti Karttunen_, Jun 11 2018