[go: up one dir, main page]

login
Signed sum over the prime multiplicities of n.
3

%I #8 Oct 05 2018 11:21:40

%S 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,

%T 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,

%U 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

%N Signed sum over the prime multiplicities of n.

%C If n = Product prime(x_i)^y_i is the prime factorization of n, then a(n) = Sum (-1)^(i-1) y_i.

%H Antti Karttunen, <a href="/A319273/b319273.txt">Table of n, a(n) for n = 1..65537</a>

%e The prime factorization of 810 is 2^1 * 3^4 * 5^1, so a(810) = 1 - 4 + 1 = -2.

%t Table[Total[MapIndexed[(-1)^(#2[[1]]-1)*#1&,Last/@FactorInteger[n]]],{n,100}]

%o (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

%Y Cf. A000040, A001221, A001222, A008683, A071321, A195017, A268387, A316523, A316524.

%K sign

%O 1,4

%A _Gus Wiseman_, Sep 16 2018

%E More terms from _Antti Karttunen_, Sep 30 2018