Greatest common divisor sequence

546 Views Asked by At

Is there a common formula for this sequence?

gcd(1,n) * gcd(2,n) * ... * gcd(m,n)

for two positive integers n,m?

1

There are 1 best solutions below

0
On BEST ANSWER

We can look at the slightly simpler problem of gcd(1,n)*gcd(2,n)*....*gcd(n-1,n). Which is the sequence

1, 1, 1, 2, 1, 12, 1, 16, 9, 80, 1, 3456, 1, 448, 2025, 2048, 1, 186624, 1,

This has an entry in the Online Encyclopedia of Integer Sequences at OEIS A051190. I can't see any particularly simple formula for this listed but the related sequence OEIS A092287 can be considered a generation of factorials.

There is one obvious simplification of your problem. If m < n and n is prime then the result must be 1.