|
|
A360158
|
|
a(n) is the number of unitary divisors of n that are odd squares minus the number of unitary divisors of n that are even squares.
|
|
1
|
|
|
1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 0, 1, 1, 1, 1, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 0, 2, 2, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 2, 0, 1, 1, 1, 0, 1, 1, 1, 2, 1, 1, 2, 0, 1, 1, 1, 0, 2, 1, 1, 0, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,9
|
|
COMMENTS
|
The least term that is larger than 2 is a(225) = 4.
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{d|n, gcd(d, n/d)=1, d square} (-1)^(d+1).
Multiplicative with a(2^e) = 1 if e is odd and 0 if e is even, and for p > 2, a(p^e) = 1 if e is odd and 2 if e is even.
Dirichlet g.f.: (zeta(s)*zeta(2*s)/zeta(3*s)) * (4^s + 2^s - 1)/(4^s + 2^s + 1).
Sum_{k=1..n} a(k) ~ c * n, where c = 5*zeta(2)/(7*zeta(3)) = 0.977451984014... .
|
|
MATHEMATICA
|
f[p_, e_] := If[OddQ[e], 1, 2]; f[2, e_] := If[OddQ[e], 1, 0]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
|
|
PROG
|
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 2]%2, 1, if(f[i, 1] == 2, 0, 2))); }
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|