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 A316523 #21 Oct 05 2023 04:08:05 %S A316523 0,1,1,-1,1,2,1,1,-1,2,1,0,1,2,2,-1,1,0,1,0,2,2,1,2,-1,2,1,0,1,3,1,1, %T A316523 2,2,2,-2,1,2,2,2,1,3,1,0,0,2,1,0,-1,0,2,0,1,2,2,2,2,2,1,1,1,2,0,-1,2, %U A316523 3,1,0,2,3,1,0,1,2,0,0,2,3,1,0,-1,2,1,1 %N A316523 Number of odd multiplicities minus number of even multiplicities in the canonical prime factorization of n. %H A316523 Robert Israel, <a href="/A316523/b316523.txt">Table of n, a(n) for n = 1..10000</a> %F A316523 If i and j are coprime, a(i*j) = a(i)+a(j). - _Robert Israel_, Aug 27 2018 %F A316523 From _Amiram Eldar_, Oct 05 2023: (Start) %F A316523 Additive with a(p^e) = (-1)^(e+1). %F A316523 a(n) = A162642(n) - A162641(n). %F A316523 Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = A077761 - 2*A179119 = -0.398962... . (End) %p A316523 f:= proc(n) local F; %p A316523 F:= map(t -> t[2],ifactors(n)[2]); %p A316523 2*nops(select(type,F,odd))-nops(F); %p A316523 end proc: %p A316523 map(f, [$1..100]); # _Robert Israel_, Aug 27 2018 %t A316523 Table[Total[-(-1)^If[n==1,{},FactorInteger[n][[All,2]]]],{n,100}] %o A316523 (PARI) a(n) = my(f=factor(n)); -sum(k=1, #f~, (-1)^(f[k,2])); \\ _Michel Marcus_, Jul 08 2018; corrected Jun 13 2022 %Y A316523 Cf. A000040, A000607, A071321, A100118, A112798. %Y A316523 Cf. A187039 (where a(n)=0). - _Michel Marcus_, Jul 08 2018 %Y A316523 Cf. A077761, A162641, A162642, A179119. %K A316523 sign,easy %O A316523 1,6 %A A316523 _Gus Wiseman_, Jul 05 2018