login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A367169 a(n) is the sum of the exponents in the prime factorization of n that are powers of 2. 5

%I #12 Nov 10 2023 12:27:04

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

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

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

%N a(n) is the sum of the exponents in the prime factorization of n that are powers of 2.

%H Amiram Eldar, <a href="/A367169/b367169.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A001222(A367168(n)).

%F Additive with a(p^e) = A048298(e).

%F a(n) <= A001222(n), with equality if and only if n is in A138302.

%F Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -P(2) + Sum_{k>=1} 2^k * (P(2^k) - P(2^k+1)) = 0.28425245481079272416..., where P(s) is the prime zeta function.

%t f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]

%o (PARI) a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2], 0));}

%o (Python)

%o from sympy import factorint

%o def A367169(n): return sum(e for e in factorint(n).values() if not(e&-e)^e) # _Chai Wah Wu_, Nov 10 2023

%Y Cf. A001222, A048298, A077761, A138302, A367168, A367170, A367171.

%Y Similar sequences: A350386, A350387.

%K nonn,easy

%O 1,4

%A _Amiram Eldar_, Nov 07 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 30 18:33 EDT 2024. Contains 375545 sequences. (Running on oeis4.)