# Greetings from The On-Line Encyclopedia of Integer Sequences! http://oeis.org/ Search: id:a318306 Showing 1-1 of 1 %I A318306 #15 Feb 11 2024 02:41:42 %S A318306 0,1,1,1,1,2,1,2,1,2,1,2,1,2,2,1,1,2,1,2,2,2,1,3,1,2,2,2,1,3,1,3,2,2, %T A318306 2,2,1,2,2,3,1,3,1,2,2,2,1,2,1,2,2,2,1,3,2,3,2,2,1,3,1,2,2,2,2,3,1,2, %U A318306 2,3,1,3,1,2,2,2,2,3,1,2,1,2,1,3,2,2,2,3,1,3,2,2,2,2,2,4,1,2,2,2,1,3,1,3,3 %N A318306 Additive with a(p^e) = A002487(e). %H A318306 Antti Karttunen, Table of n, a(n) for n = 1..65537 %H A318306 Index entries for sequences computed from exponents in factorization of n. %F A318306 a(n) = A007814(A318307(n)). %F A318306 Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) = 0.15790080909728804399..., where f(x) = -x + x * (1-x) * Product{k>=0} (1 + x^(2^k) + x^(2^(k + 1))). - _Amiram Eldar_, Feb 11 2024 %o A318306 (PARI) %o A318306 A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487 %o A318306 A318306(n) = vecsum(apply(e -> A002487(e),factor(n)[,2])); %o A318306 (Python) %o A318306 from functools import reduce %o A318306 from sympy import factorint %o A318306 def A318306(n): return sum(sum(reduce(lambda x,y:(x[0],x[0]+x[1]) if int(y) else (x[0]+x[1],x[1]),bin(e)[-1:2:-1],(1,0))) for e in factorint(n).values()) # _Chai Wah Wu_, May 18 2023 %Y A318306 Cf. A002487, A077761, A318307. %Y A318306 Cf. also A046644. %K A318306 nonn %O A318306 1,6 %A A318306 _Antti Karttunen_, Aug 29 2018 # Content is available under The OEIS End-User License Agreement: http://oeis.org/LICENSE