OFFSET
6,1
COMMENTS
Analogous to the Kempner sequence A002034 where one goes forwards instead of backwards.
Least multiple of n of the form (n-1)!/k! if n is composite, 0 if n is prime.
a(1) = ... = a(5) = 0, so offset is set to 6. In fact 4 is the only composite n such that a(n) = 0. a(2p) = (2p-1)!/(p-1)! if p is a prime.
LINKS
Harvey P. Dale, Table of n, a(n) for n = 6..733
EXAMPLE
9 divides 8*7*6*5*4*3 = 20160 but 9 does not divide 8*7*6*5*4, so a(9) = 20160.
MATHEMATICA
Table[SelectFirst[FoldList[Times, Range[n-1, 0, -1]], Divisible[#, n]&], {n, 6, 40}] (* Harvey P. Dale, Jul 29 2015 *)
PROG
(PARI) m=32; for(n=6, m, r=1; p=n-r; while(r<=n&&p%n>0, r++; p=p*(n-r)); print1(p, ", "))
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Mar 16 2004
EXTENSIONS
Edited and extended by Klaus Brockhaus, Mar 17 2004
STATUS
approved