OFFSET
1,3
LINKS
Ivan Neretin, Table of n, a(n) for n = 1..1000
FORMULA
a(n) = (n-d_1)(n-d_2)...(n-d_k) where d_k is the largest divisor of n less than n (k = tau(n) - 1).
a(p) = p-1, a(pq) = pq(p-1)(q-1)(pq-1), p and q prime.
If n is not a prime or the square of a prime then n divides a(n).
EXAMPLE
a(6) = (6-1)(6-2)(6-3) = 60.
For n = 16 the divisors d < n are 1,2,4 and 8, so a(16) = (16-1)*(16-2)*(16-4)*(16-8) = 15*14*12*8 = 20160.
MATHEMATICA
Table[Times @@ (n - Most[Divisors[n]]), {n, 1, 40}] (* Ivan Neretin, May 26 2015 *)
PROG
(PARI) for(n=1, 40, d=divisors(n); print1(prod(j=1, matsize(d)[2]-1, n-d[j]), ", "))
(PARI) a(n)=factorback(apply(d->if(d<n, n-d, 1), divisors(n))) \\ Charles R Greathouse IV, May 26 2015
(Haskell)
a072513 n = product $ map (n -) $ a027751_row n
-- Reinhard Zumkeller, May 27 2015
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Jul 28 2002
EXTENSIONS
Edited and extended by Klaus Brockhaus, Jul 31 2002
STATUS
approved