|
|
A263649
|
|
a(n) is multiplicative with a(2^e) = (-1)^e, a(3^e) = -2*(-1)^e if e>0, a(p^e) = e+1 if p == 1, 7 (mod 24), a(p^e) = (e+1) * (-1)^e if p == 5, 11 (mod 24), a(p^e) = (1 + (-1)^e) / 2 if p == 13, 17, 19, 23 (mod 24).
|
|
1
|
|
|
1, -1, 2, 1, -2, -2, 2, -1, -2, 2, -2, 2, 0, -2, -4, 1, 0, 2, 0, -2, 4, 2, 0, -2, 3, 0, 2, 2, -2, 4, 2, -1, -4, 0, -4, -2, 0, 0, 0, 2, 0, -4, 0, -2, 4, 0, 0, 2, 3, -3, 0, 0, -2, -2, 4, -2, 0, 2, -2, -4, 0, -2, -4, 1, 0, 4, 0, 0, 0, 4, 0, 2, 2, 0, 6, 0, -4, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
Sum_{k=1..n} abs(a(k)) ~ (2/3)*sqrt(2/3)*Pi*n. - Amiram Eldar, Jan 29 2024
|
|
EXAMPLE
|
G.f. = x - x^2 + 2*x^3 + x^4 - 2*x^5 - 2*x^6 + 2*x^7 - x^8 - 2*x^9 + ...
|
|
MATHEMATICA
|
a[ n_] := If[ n < 1, 0, Times @@ (Which[ # < 4, {-1, 1, -2}[[#]] (-1)^#2, Mod[#, 24] < 12, (#2 + 1) KroneckerSymbol[ #, 12]^#2, True, 1 - Mod[#2, 2]]& @@@ FactorInteger[n])];
|
|
PROG
|
(PARI) {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, (-1)^e, p==3, -2 * (-1)^e, p%24>12, 1-e%2, (e+1) * kronecker(p, 12)^e )))};
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|