>>493

library(gtools)
permutations(2, 3, c(T, F), repeats.allowed=TRUE)[8:1,]