login
The 2-adic valuation of A109812(n); The exponent of the highest power of 2 dividing A109812(n).
4

%I #13 Jul 16 2022 11:32:08

%S 0,1,2,0,3,0,1,4,1,0,1,2,0,1,5,0,3,0,2,0,2,0,3,0,1,0,4,0,6,1,0,1,0,1,

%T 0,1,0,3,0,5,0,2,0,2,0,2,4,0,3,7,0,1,0,1,0,1,0,1,2,1,0,1,0,2,1,0,1,3,

%U 0,3,0,2,0,2,6,0,5,0,4,0,2,0,1,0,1,0,1,0,1,0,1,0,1,0,1,2,0,4,0,1,2,0,8,0,4

%N The 2-adic valuation of A109812(n); The exponent of the highest power of 2 dividing A109812(n).

%H Antti Karttunen, <a href="/A351964/b351964.txt">Table of n, a(n) for n = 1..100000</a>

%H <a href="/index/Bi#binary">Index entries for sequences related to binary expansion of n</a>

%F a(n) = A007814(A109812(n)).

%o (PARI)

%o v109812 = readvec("b109812_to10e5.txt"); \\ Prepared from b-file data with gawk ' { print $2 } '

%o up_to = #v109812;

%o A109812(n) = v109812[n];

%o A007814(n) = valuation(n,2);

%o A351964(n) = A007814(A109812(n));

%o (Python)

%o from itertools import count, islice

%o def A351964_gen(): # generator of terms

%o yield 0

%o l1, s, b = 1, 2, set()

%o while True:

%o for i in count(s):

%o if not (i in b or i & l1):

%o yield (~i&i-1).bit_length()

%o l1 = i

%o b.add(i)

%o while s in b:

%o b.remove(s)

%o s += 1

%o break

%o A351964_list = list(islice(A351964_gen(),30)) # _Chai Wah Wu_, Jul 16 2022

%Y Cf. A007814, A109812, A351578, A351965.

%K nonn,base

%O 1,3

%A _Antti Karttunen_, Apr 07 2022