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.

A318306 Additive with a(p^e) = A002487(e).

This page as a plain text file.
%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, <a href="/A318306/b318306.txt">Table of n, a(n) for n = 1..65537</a>
%H A318306 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>.
%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