|
|
A338690
|
|
Inverse Moebius transform of A209615.
|
|
3
|
|
|
1, 0, 0, 1, 2, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 1, 2, 0, 0, 2, 0, 0, 0, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 1, 4, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 4, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
COMMENTS
|
Earliest occurrence of k is A018782(k).
|
|
LINKS
|
|
|
FORMULA
|
Multiplicative with a(p^e) = e + 1 if p == 1 (mod 4), a(p^e) = (1 + (-1)^e)/2 if p = 2 or p == 3 (mod 4).
a(n) = A002654(n) = A035184(n) for odd n. a(2^e * m) = a(m) for even m, 0 for odd m.
Dirichlet g.f.: zeta(s)*beta(s)/(1 + 2^(-s)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi/6 = 0.523598... (A019673). - Amiram Eldar, Oct 22 2022
|
|
MATHEMATICA
|
f[p_, e_] := If[Mod[p, 4] == 1, e + 1, (1 + (-1)^e)/2]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 22 2022 *)
|
|
PROG
|
(PARI) a(n) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); if(p%4==1, r*=e+1, if(e%2, return(0)))); r
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy,mult
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|