A319273 Signed sum over the prime multiplicities of n.
1, 1, 1, 2, 1, 0, 1, 3, 2, 0, 1, 1, 1, 0, 0, 4, 1, -1, 1, 1, 0, 0, 1, 2, 2, 0, 3, 1, 1, 1, 1, 5, 0, 0, 0, 0, 1, 0, 0, 2, 1, 1, 1, 1, 1, 0, 1, 3, 2, -1, 0, 1, 1, -2, 0, 2, 0, 0, 1, 2, 1, 0, 1, 6, 0, 1, 1, 1, 0, 1, 1, 1, 1, 0, -1, 1, 0, 1, 1, 3, 4, 0, 1, 2, 0, 0, 0, 2, 1, 0, 0, 1, 0, 0, 0, 4, 1, -1, 1, 0, 1, 1, 1, 2, 1
Offset: 1
Keywords
Examples
The prime factorization of 810 is 2^1 * 3^4 * 5^1, so a(810) = 1 - 4 + 1 = -2.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Programs
-
Mathematica
Table[Total[MapIndexed[(-1)^(#2[[1]]-1)*#1&,Last/@FactorInteger[n]]],{n,100}]
-
PARI
A319273(n) = if(1==n, n, my(f=factor(n)); sum(i=1, #f~, f[i,2] * ((-1)^(i-1)))); \\ Antti Karttunen, Sep 30 2018
Extensions
More terms from Antti Karttunen, Sep 30 2018
Comments