2
$\begingroup$

What is $ \prod_{i=1}^n\prod_{j=1}^{n-i}i^2+j^2 $ ?

It feels like there should be some way to simplify this or calculate it more efficiently than iterating over each of the $\sim n^2/2$ points.

The inner product is a special case of $ \prod_{j=1}^Nj^2+k $ for which a special form exists in terms of the hyperbolic sine and gamma function, but I don't know how hard it would be to use this to compute the exact (integer) product.

  • 0
    @TMM: I agree -- actually I saw this and a few other minor optimizations. But I thought that there might be an entirely different approach, and I thought that presenting it in its simplest form would be best. Similarly, I could have written the first limit as n-1 but for simplicity left it as n (same value either way).2012-05-02

2 Answers 2

2

Call your number $F(n)$. $F(n)/F(n-1) = \prod_{i=1}^n (i^2 + (n-i)^2)$. If $n$ is odd, this is an odd square because the factors pair up, $i^2 + (n-i)^2$ with $(n-i)^2 + i^2$, and all factors are odd. If $n$ is even, all factors pair up except $(n/2)^2 + (n/2)^2 = 2 (n/2)^2$, so the result is twice a square.

It looks to me like the $2$-adic order of $F(n)/F(n-1)$ is $3 n (1 - 1/2^m) - 2 m$ where $m$ is the $2$-adic order of $n$.

I suspect one may be able to identify the $p$-adic orders for odd primes as well. Note, by the way, that the primes $p \equiv 3 \mod 4$ only appear in $F(n)/F(n-1)$ when $n$ is divisible by $p$.

  • 1
    @WillJagy: I don't know what additional detail you want. I came across the expression in working out a program for A204044, but it seemed simple enough to state that I wondered if it had a nicer form.2012-05-03
0

If you want an exact answer, I suspect you're out of luck. If you'll settle for approximations/asymptotics, I suggest taking the logarithm, dividing by the number of terms in the resulting sum (roughly $(1/2)n^2$), and then seeing whether you can't relate it to some integral (maybe it's a Riemann sum for an integral, or a sampling over some uniformly distributed set).

  • 0
    Yes, I want an exact answer.2012-05-02