|
|
A298735
|
|
Number of odd squares dividing n.
|
|
4
|
|
|
1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 1, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,9
|
|
COMMENTS
|
|
|
LINKS
|
|
|
FORMULA
|
G.f.: Sum_{k>=1} x^((2*k-1)^2)/(1 - x^((2*k-1)^2)).
Multiplicative with a(2^e) = 1 and a(p^e) = floor(e/2) + 1 for p > 2. - Amiram Eldar, Sep 11 2020
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi^2/8 (A111003). - Amiram Eldar, Sep 25 2022
|
|
EXAMPLE
|
a(81) = 3 because 81 has 5 divisors {1, 3, 9, 27, 81} among which 3 are odd squares {1, 9, 81}.
|
|
MATHEMATICA
|
nmax = 105; Rest[CoefficientList[Series[Sum[x^(2 k - 1)^2/(1 - x^(2 k - 1)^2), {k, 1, nmax}], {x, 0, nmax}], x]]
a[n_] := Length[Select[Divisors[n], IntegerQ[Sqrt[#]] && OddQ[#] &]]; Table[a[n], {n, 1, 105}]
f[2, e_] := 1; f[p_, e_] := Floor[e/2] + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 11 2020 *)
|
|
PROG
|
(PARI) a(n)=factorback(apply(e->e\2+1, factor(n/2^valuation(n, 2))[, 2])) \\ Rémy Sigrist, Jan 26 2018
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,mult,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|