OFFSET
3,1
MAPLE
abulsme := proc(L, k) local r, p, dangl, R, c; R := ceil(nops(L)/k) ; p := [] ; dangl := nops(L) mod k ; for c from k to 1 by -1 do for r from 1 to R do if r = R and dangl>0 and c>dangl then break; fi; p := [op(p), op(c+k*(r-1), L) ] ; od: od: RETURN(p) ; end: isSrtd := proc(L) for i from 1 to nops(L)-1 do if op(i, L) > op(i+1, L) then RETURN(false) ; fi; od: RETURN(true) ; end: A105272 := proc(n, k) local a, L; L := [seq(i, i=1..n)] ; a := 1 ; L := abulsme(L, k) ; while not isSrtd(L) do L := abulsme(L, k) ; a := a+1 ; od: RETURN(a) ; end: A118960 := proc(n) A105272(n, 3) ; end: for n from 3 to 80 do printf("%d, ", A118960(n)) ; od: # R. J. Mathar, Aug 11 2008
MATHEMATICA
k = 3;
Table[f = Range[n]; fp = {};
For[col = k, col > 0, col--,
For[row = 0, col + row*k <= n, row++,
AppendTo[fp, f[[col + row*k]]]]];
LCM @@ Length /@ First[FindPermutation[f, fp]], {n, k, 76}] (* Robert Price, Aug 26 2019 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
N. J. A. Sloane, Aug 10 2008, based on email from Samuel Minter (abulsme(AT)abulsme.com), May 08 2008, Aug 10 2008
EXTENSIONS
Extended beyond a(12) by R. J. Mathar, Aug 11 2008
STATUS
approved