login
Number of trailing 1-bits in the binary representation of A003961(n): a(n) = A007814(1+A003961(n)).
3

%I #9 Jul 02 2022 01:52:16

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

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

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

%N Number of trailing 1-bits in the binary representation of A003961(n): a(n) = A007814(1+A003961(n)).

%H Antti Karttunen, <a href="/A336842/b336842.txt">Table of n, a(n) for n = 1..65537</a>

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

%H <a href="/index/Pri#prime_indices">Index entries for sequences computed from indices in prime factorization</a>

%F a(n) = A007814(1+A003961(n)).

%o (PARI)

%o A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };

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

%o A336842(n) = A007814(1+A003961(n));

%o (Python)

%o from math import prod

%o from sympy import factorint, nextprime

%o def A336842(n): return (~((m:=prod(nextprime(p)**e for p, e in factorint(n).items()))+1)& m).bit_length() # _Chai Wah Wu_, Jul 01 2022

%Y Cf. A003961, A007814, A246261 (positions of ones), A336843, A336844.

%K nonn

%O 1,2

%A _Antti Karttunen_, Aug 06 2020