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.
%I A318316 #16 May 19 2023 01:49:23 %S A318316 1,2,2,4,2,4,2,8,4,4,2,8,2,4,4,8,2,8,2,8,4,4,2,16,4,4,8,8,2,8,2,16,4, %T A318316 4,4,16,2,4,4,16,2,8,2,8,8,4,2,16,4,8,4,8,2,16,4,16,4,4,2,16,2,4,8,32, %U A318316 4,8,2,8,4,8,2,32,2,4,8,8,4,8,2,16,8,4,2,16,4,4,4,16,2,16,4,8,4,4,4,32,2,8,8,16,2,8,2,16,8 %N A318316 Multiplicative with a(p^e) = 2^A007306(e). %H A318316 Antti Karttunen, <a href="/A318316/b318316.txt">Table of n, a(n) for n = 1..16384</a> %H A318316 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A318316 a(n) = 2^A318322(n). %F A318316 a(n) = A318307(A003557(n^2)) = A318307(A003557(n))*A318307(n). %o A318316 (PARI) %o A318316 A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487 %o A318316 A007306(n) = if(!n,1,A002487(n+n-1)); %o A318316 A318316(n) = factorback(apply(e -> 2^A007306(e),factor(n)[,2])); %o A318316 (Python) %o A318316 from functools import reduce %o A318316 from sympy import factorint %o A318316 def A318316(n): return 1<<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 A318316 Cf. A007306, A318307, A318322. %K A318316 nonn,mult %O A318316 1,2 %A A318316 _Antti Karttunen_, Aug 31 2018