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.

A318322 Additive with a(p^e) = A007306(e).

This page as a plain text file.
%I A318322 #11 May 19 2023 01:50:46
%S A318322 0,1,1,2,1,2,1,3,2,2,1,3,1,2,2,3,1,3,1,3,2,2,1,4,2,2,3,3,1,3,1,4,2,2,
%T A318322 2,4,1,2,2,4,1,3,1,3,3,2,1,4,2,3,2,3,1,4,2,4,2,2,1,4,1,2,3,5,2,3,1,3,
%U A318322 2,3,1,5,1,2,3,3,2,3,1,4,3,2,1,4,2,2,2,4,1,4,2,3,2,2,2,5,1,3,3,4,1,3,1,4,3
%N A318322 Additive with a(p^e) = A007306(e).
%H A318322 Antti Karttunen, <a href="/A318322/b318322.txt">Table of n, a(n) for n = 1..65537</a>
%H A318322 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a>
%F A318322 a(n) = A007814(A318316(n)).
%o A318322 (PARI)
%o A318322 A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487
%o A318322 A007306(n) = if(!n,1,A002487(n+n-1));
%o A318322 A318322(n) = vecsum(apply(e -> A007306(e),factor(n)[,2]));
%o A318322 (Python)
%o A318322 from functools import reduce
%o A318322 from sympy import factorint
%o A318322 def A318322(n): return sum(sum(reduce(lambda x,y:(x[0],sum(x)) if int(y) else (sum(x),x[1]),bin((e<<1)-1)[-1:2:-1],(1,0))) for e in factorint(n).values()) # _Chai Wah Wu_, May 18 2023
%Y A318322 Cf. A007306, A318306, A318316.
%Y A318322 Differs from A122810 for the first time at n=48, where a(48) = 4, while A122810(48) = 5.
%K A318322 nonn
%O A318322 1,4
%A A318322 _Antti Karttunen_, Aug 31 2018