Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #13 Nov 27 2017 00:20:47
%S 60,0,840,20160,15120,0,7920,0,8648640,240240,3603600,0,8910720,0,
%T 1395360,390700800,14079294028800,0,212520,7117005772800,
%U 32382376266240000,1133836704000,4475671200,0,14250600,0,318073392000
%N a(n) = (n-1)*(n-2)*...*(n-r) with the least value of r so that n divides a(n).
%C Analogous to the Kempner sequence A002034 where one goes forwards instead of backwards.
%C Least multiple of n of the form (n-1)!/k! if n is composite, 0 if n is prime.
%C 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.
%H Harvey P. Dale, <a href="/A092914/b092914.txt">Table of n, a(n) for n = 6..733</a>
%e 9 divides 8*7*6*5*4*3 = 20160 but 9 does not divide 8*7*6*5*4, so a(9) = 20160.
%t Table[SelectFirst[FoldList[Times,Range[n-1,0,-1]],Divisible[#,n]&],{n,6,40}] (* _Harvey P. Dale_, Jul 29 2015 *)
%o (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,","))
%Y Cf. A092915, A092916.
%K nonn
%O 6,1
%A _Amarnath Murthy_, Mar 16 2004
%E Edited and extended by _Klaus Brockhaus_, Mar 17 2004