Skip to main content
1 of 2
sinedcm
  • 420
  • 3
  • 5

in Q (25 characters)

t:{(x-1) (p:{0+':x,0})\1}

Sample usage:

q)t 4
1
1 1
1 2 1
1 3 3 1
sinedcm
  • 420
  • 3
  • 5