OFFSET
1,8
COMMENTS
This sequence describes the number of squares in the set of all possible products of divisors of n. In general one may ask how many other figurate numbers, polygonal numbers, polyhedral numbers are in the set of all possible products of divisors of n? A harder question: how many squares (or other figurate numbers) are in the set of all possible sums of divisors of n?
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..65537 (first 200 terms from R. J. Mathar)
FORMULA
An example: let n = p1^a1 * p2^a2 * p3^a3, p1, p2, p3 primes, a1, a2, a3 positive integers >= 1. Then f(n) = floor(a1 * (a1 + 1) * (a2 + a3 + a2 * a3 + 1) / 4) * floor(a2 * (a2 + 1) * (a1 + a3 + a1 * a3 + 1) / 4) * floor(a3 * (a3 + 1) * (a1 + a2 + a1 * a2 + 1) / 4).
For n = p1^a1 * ... * pk^ak, p1, ..., pk primes, a1, ..., ak positive integers >= 1 we have f(n) = Product_{s=1..k} (floor(as * (as + 1) * (1 + sum of all possible products of ai, i not equal to s) / 4)).
EXAMPLE
n = 4, divisors are 1, 2, 4. Product of divisors is 2^3. Floor(3/2) = 1 so 1 square is there in the form 2^2.
n = 28, divisors are 1, 2, 4, 7, 14, 28. Product of divisors is 2^6 * 7^3. Floor(6/2) * floor(3/2) = 3 so 3 squares are there : 2^6 * 7^2, 2^4 * 7^2, 2^2 * 7^2. Squares of the form 2^j or 7^k which do not have the full prime factor set {2,7} are not counted.
MATHEMATICA
Table[With[{r = Times @@ FactorInteger[n][[All, 1]]}, DivisorSum[Times @@ Divisors@ n, 1 &, And[IntegerQ@ Sqrt@ #, Times @@ FactorInteger[#][[All, 1]] == r] &]], {n, 80}] (* Michael De Vlieger, Oct 30 2017 *)
PROG
(PARI) a(n)=my(p=1); fordiv(n, d, p*=d); p=factor(p)~; prod(i=1, #p, p[2, i]\2) \\ M. F. Hasler, Sep 18 2012
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Sep 14 2012
STATUS
approved