A055067 Product of numbers < n which do not divide n (or 1 if no such numbers exist).
1, 1, 2, 3, 24, 20, 720, 630, 13440, 36288, 3628800, 277200, 479001600, 444787200, 5811886080, 20432412000, 20922789888000, 1097800704000, 6402373705728000, 304112751022080, 115852476579840000, 2322315553259520000
Offset: 1
Examples
a(5)=2*3*4=24, a(6)=4*5=20.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..250
Programs
-
Haskell
a055067 n = product [k | k <- [1..n], mod n k /= 0] -- Reinhard Zumkeller, Feb 06 2012
-
Mathematica
Table[Apply[Times, Complement[Range[n], Divisors[n]]], {n, 1, 20}] (* Geoffrey Critzer, Dec 13 2014 *) a[n_] := n!/n^(DivisorSigma[0, n]/2); Array[a, 25] (* Amiram Eldar, Jun 26 2022 *)
-
PARI
a(n) = n!/vecprod(divisors(n)); \\ Michel Marcus, Dec 26 2021
-
Python
from math import factorial, isqrt from sympy import divisor_count def A055067(n): return factorial(n)//(isqrt(n)**c if (c:=divisor_count(n)) & 1 else n**(c//2)) # Chai Wah Wu, Jun 25 2022
Extensions
More terms from David Wasserman, Mar 15 2002