|
|
A305614
|
|
Expansion of Sum_{p prime} x^p/(1 + x^p).
|
|
13
|
|
|
0, 0, 1, 1, -1, 1, 0, 1, -1, 1, 0, 1, -2, 1, 0, 2, -1, 1, 0, 1, -2, 2, 0, 1, -2, 1, 0, 1, -2, 1, -1, 1, -1, 2, 0, 2, -2, 1, 0, 2, -2, 1, -1, 1, -2, 2, 0, 1, -2, 1, 0, 2, -2, 1, 0, 2, -2, 2, 0, 1, -3, 1, 0, 2, -1, 2, -1, 1, -2, 2, -1, 1, -2, 1, 0, 2, -2, 2, -1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,13
|
|
COMMENTS
|
a(n) is the number of prime divisors p|n such that n/p is odd, minus the number of prime divisors p|n such that n/p is even.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = -Sum_{p|n prime} (-1)^(n/p).
If n == 2 (mod 4), a(n) = 2 - A001221(n).
If n == 0 (mod 4) and n > 0, a(n) = -A001221(n). (End)
L.g.f.: log(Product_{k>=1} (1 + x^prime(k))^(1/prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
|
|
EXAMPLE
|
The prime divisors of 12 are 2, 3. We see that 12/2 = 6, 12/3 = 4. None of those are odd, but both of them are even, so a(12) = -2.
The prime divisors of 30 are {2,3,5} with quotients {15,10,6}. One of these is odd and two are even, so a(30) = 1 - 2 = -1.
|
|
MAPLE
|
a:= n-> -add((-1)^(n/i[1]), i=ifactors(n)[2]):
# Alternative
N:= 1000: # to get a(0)..a(N)
V:= Vector(N):
p:= 1:
do
p:= nextprime(p);
if p > N then break fi;
R:= [seq(i, i=p..N, p)];
W:= <seq((-1)^(n+1), n=1..nops(R))>;
V[R]:= V[R]+W;
od:
|
|
MATHEMATICA
|
Table[Sum[If[PrimeQ[d], (-1)^(n/d - 1), 0], {d, Divisors[n]}], {n, 30}]
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|