login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316523 Number of odd multiplicities minus number of even multiplicities in the canonical prime factorization of n. 27
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, 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, 3, 1, 0, 2, 3, 1, 0, 1, 2, 0, 0, 2, 3, 1, 0, -1, 2, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
If i and j are coprime, a(i*j) = a(i)+a(j). - Robert Israel, Aug 27 2018
From Amiram Eldar, Oct 05 2023: (Start)
Additive with a(p^e) = (-1)^(e+1).
a(n) = A162642(n) - A162641(n).
Sum_{k=1..n} a(k) = n * log(log(n)) + c * n + O(n/log(n)), where c = A077761 - 2*A179119 = -0.398962... . (End)
MAPLE
f:= proc(n) local F;
F:= map(t -> t[2], ifactors(n)[2]);
2*nops(select(type, F, odd))-nops(F);
end proc:
map(f, [$1..100]); # Robert Israel, Aug 27 2018
MATHEMATICA
Table[Total[-(-1)^If[n==1, {}, FactorInteger[n][[All, 2]]]], {n, 100}]
PROG
(PARI) a(n) = my(f=factor(n)); -sum(k=1, #f~, (-1)^(f[k, 2])); \\ Michel Marcus, Jul 08 2018; corrected Jun 13 2022
CROSSREFS
Cf. A187039 (where a(n)=0). - Michel Marcus, Jul 08 2018
Sequence in context: A243842 A367405 A112400 * A219185 A365658 A116861
KEYWORD
sign,easy
AUTHOR
Gus Wiseman, Jul 05 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 18:02 EDT 2024. Contains 371750 sequences. (Running on oeis4.)