OFFSET
1,2
COMMENTS
What is the least n > 2 for which a(n) - prevprime(a(n)) is a composite number? If such a number n exists, it is greater than 250.
The least n for which nextprime(a(n)) - a(n) is a composite number is 158.
LINKS
Michel Marcus, Table of n, a(n) for n = 1..100
FORMULA
a(n) = Product_{t=1..n-1} (Product_{k=0..floor((n-1)/t)} (n-t*k)).
a(n) = (n^(n-1))*Product_{k=1..n-1} k^tau(n-k).
EXAMPLE
a(2) = (2!1) = (2*1) = 2;
a(3) = (3!1)*(3!2) = (3*2*1)*(3*1) = 18;
a(4) = (4!1)*(4!2)*(4!3) = (4*3*2*1)*(4*2)*(4*1) = 768;
a(5) = (5!1)*(5!2)*(5!3)*(5!4) = (5*4*3*2*1)*(5*3*1)*(5*2)*(5*1) = 90000.
MAPLE
b:= proc(n, k) option remember; `if`(n<1, 1, n*b(n-k, k)) end:
a:= n-> mul(b(n, k), k=1..n-1):
seq(a(n), n=1..20); # Alois P. Heinz, Dec 02 2018
MATHEMATICA
Array[(#^(# - 1)) Product[k^DivisorSigma[0, # - k], {k, # - 1}] &, 13] (* Michael De Vlieger, Jan 04 2018 *)
PROG
(PARI) a(n) = (n^(n-1))*prod(k=1, n-1, k^numdiv(n-k)); \\ Michel Marcus, Dec 02 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Lechoslaw Ratajczak, Jan 03 2018
STATUS
approved