cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A367169 #12 Nov 10 2023 12:27:04
%S A367169 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 A367169 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 A367169 2,3,1,2,1,2,3,3,2,3,1,5,4,2,1,4,2,2,2
%N A367169 a(n) is the sum of the exponents in the prime factorization of n that are powers of 2.
%H A367169 Amiram Eldar, <a href="/A367169/b367169.txt">Table of n, a(n) for n = 1..10000</a>
%F A367169 a(n) = A001222(A367168(n)).
%F A367169 Additive with a(p^e) = A048298(e).
%F A367169 a(n) <= A001222(n), with equality if and only if n is in A138302.
%F A367169 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 A367169 f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
%o A367169 (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 A367169 (Python)
%o A367169 from sympy import factorint
%o A367169 def A367169(n): return sum(e for e in factorint(n).values() if not(e&-e)^e) # _Chai Wah Wu_, Nov 10 2023
%Y A367169 Cf. A001222, A048298, A077761, A138302, A367168, A367170, A367171.
%Y A367169 Similar sequences: A350386, A350387.
%K A367169 nonn,easy
%O A367169 1,4
%A A367169 _Amiram Eldar_, Nov 07 2023