OFFSET
1,11
FORMULA
T(1, 1) = 1, T(n, k) = sum(i = k..(n-1), T(n-1, i)) if n is prime, T(n, k) = sum(i = 1..(k-1), T(n-1, i)) if n is composite.
EXAMPLE
T(5, 2) = 3: the 3 permutations are <4,3,1,5,2>, <5,3,1,4,2> and <5,4,1,3,2>.
CROSSREFS
KEYWORD
AUTHOR
David Wasserman, Aug 05 2004
STATUS
approved