cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A298735 Number of odd squares dividing n.

Original entry on oeis.org

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
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 25 2018

Keywords

Comments

The smallest integer with exactly m odd square divisors is A357450(m). - Bernard Schott, Oct 03 2022

Examples

			a(81) = 3 because 81 has 5 divisors {1, 3, 9, 27, 81} among which 3 are odd squares {1, 9, 81}.
		

Crossrefs

Programs

  • 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 *)
  • PARI
    a(n)=factorback(apply(e->e\2+1, factor(n/2^valuation(n,2))[, 2])) \\ Rémy Sigrist, Jan 26 2018

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
a(n) = A046951(4*n) - A046951(n) = A046951(A000265(n)). - Velin Yanev, Antti Karttunen, Dec 06 2021
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Pi^2/8 (A111003). - Amiram Eldar, Sep 25 2022

Extensions

Keyword mult added by Rémy Sigrist, Jan 26 2018