login
Inverse Moebius transform of Fredholm-Rueppel sequence, cf. A036987.
43

%I #30 Dec 31 2023 06:23:45

%S 1,1,2,1,1,2,2,1,2,1,1,2,1,2,3,1,1,2,1,1,3,1,1,2,1,1,2,2,1,3,2,1,2,1,

%T 2,2,1,1,2,1,1,3,1,1,3,1,1,2,2,1,2,1,1,2,1,2,2,1,1,3,1,2,4,1,1,2,1,1,

%U 2,2,1,2,1,1,3,1,2,2,1,1,2,1,1,3,1,1,2,1,1,3,2,1,3,1,1,2,1,2,2,1,1,2,1,1,4

%N Inverse Moebius transform of Fredholm-Rueppel sequence, cf. A036987.

%C Number of ways to write n as a sum a_1 + ... + a_k where the a_i are positive integers and a_i = 2 * a_{i-1}, cf. A000929.

%C Number of divisors of n of the form 2^k - 1 (A000225) for k >= 1. - _Jeffrey Shallit_, Jan 23 2017

%H Antti Karttunen, <a href="/A154402/b154402.txt">Table of n, a(n) for n = 1..65537</a> (first 10000 terms from Robert Israel)

%F G.f.: Sum_{k>0} x^(2^k-1)/(1-x^(2^k-1)).

%F From _Antti Karttunen_, Jun 11 2018: (Start)

%F a(n) = Sum_{d|n} A036987(d).

%F a(n) = A305426(n) + A036987(n). (End)

%F a(n) = A147645(n) + A353786(n). - _Antti Karttunen_, May 12 2022

%F Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = A065442 = 1.606695... . - _Amiram Eldar_, Dec 31 2023

%p N:= 200: # to get a(1)..a(N)

%p A:= Vector(N):

%p for k from 1 do

%p t:= 2^k-1;

%p if t > N then break fi;

%p R:= [seq(i,i=t..N,t)];

%p A[R]:= map(`+`,A[R],1)

%p od:

%p convert(A,list); # _Robert Israel_, Jan 23 2017

%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 A036987(n) = A209229(1+n);

%o A154402(n) = sumdiv(n,d,A036987(d)); \\ _Antti Karttunen_, Jun 11 2018

%o (PARI) A154402(n) = { my(m=1,s=0); while(m<=n, s += !(n%m); m += (m+1)); (s); }; \\ _Antti Karttunen_, May 12 2022

%Y Cf. A000225, A000929, A001511, A036987, A065442, A147645, A161790 (positions of 1's), A305426, A353786.

%Y Cf. also A305436.

%K easy,nonn

%O 1,3

%A _Vladeta Jovovic_, Jan 08 2009