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 A318307 #20 May 19 2023 01:48:40 %S A318307 1,2,2,2,2,4,2,4,2,4,2,4,2,4,4,2,2,4,2,4,4,4,2,8,2,4,4,4,2,8,2,8,4,4, %T A318307 4,4,2,4,4,8,2,8,2,4,4,4,2,4,2,4,4,4,2,8,4,8,4,4,2,8,2,4,4,4,4,8,2,4, %U A318307 4,8,2,8,2,4,4,4,4,8,2,4,2,4,2,8,4,4,4,8,2,8,4,4,4,4,4,16,2,4,4,4,2,8,2,8,8 %N A318307 Multiplicative with a(p^e) = 2^A002487(e). %H A318307 Antti Karttunen, <a href="/A318307/b318307.txt">Table of n, a(n) for n = 1..16384</a> %H A318307 <a href="/index/Eu#epf">Index entries for sequences computed from exponents in factorization of n</a> %F A318307 a(n) = 2^A318306(n). %F A318307 a(n) = A061142(A318470(n)). %F A318307 a(n^2) = a(n). %F A318307 a(A003557(n^2)) = A318316(n). %F A318307 Dirichlet convolution square of A318667(n)/A317934(n). %t A318307 f[m_] := Module[{a = 1, b = 0, n = m}, While[n > 0, If[OddQ[n], b += a, a += b]; n = Floor[n/2]]; b]; Array[Times @@ Map[2^f@ # &, FactorInteger[#][[All, -1]] ] - Boole[# == 1] &, 105] (* after _Jean-François Alcover_ at A002487 *) %o A318307 (PARI) %o A318307 A002487(n) = { my(a=1, b=0); while(n>0, if(bitand(n, 1), b+=a, a+=b); n>>=1); (b); }; \\ From A002487 %o A318307 A318307(n) = factorback(apply(e -> 2^A002487(e),factor(n)[,2])); %o A318307 (Python) %o A318307 from functools import reduce %o A318307 from sympy import factorint %o A318307 def A318307(n): return 1<<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 A318307 Cf. A318306, A318316, A318470, A318667. %Y A318307 Differs from A037445 for the first time at n=32, where a(32) = 8, while A037445(32) = 4. %K A318307 nonn,mult %O A318307 1,2 %A A318307 _Antti Karttunen_, Aug 29 2018