I coded that in [Sage][1] if you want to use it immediately (see the [patch][2], see the [documentation][3]) : sage: from sage.combinat.designs.block_design import steiner_triple_system sage: list(steiner_triple_system(7)) [[0, 1, 3], [0, 2, 4], [0, 5, 6], [1, 2, 6], [1, 4, 5], [2, 3, 5], [3, 4, 6]] sage: list(steiner_triple_system(9)) [[0, 1, 5], [0, 2, 4], [0, 3, 6], [0, 7, 8], [1, 2, 3], [1, 4, 7], [1, 6, 8], [2, 5, 8], [2, 6, 7], [3, 4, 8], [3, 5, 7], [4, 5, 6]] sage: list(steiner_triple_system(13)) [[0, 1, 6], [0, 2, 5], [0, 3, 7], [0, 4, 8], [0, 9, 11], [0, 10, 12], [1, 2, 7], [1, 3, 4], [1, 5, 9], [1, 8, 10], [1, 11, 12], [2, 3, 6], [2, 4, 12], [2, 8, 9], [2, 10, 11], [3, 5, 12], [3, 8, 11], [3, 9, 10], [4, 5, 10], [4, 6, 9], [4, 7, 11], [5, 6, 11], [5, 7, 8], [6, 7, 10], [6, 8, 12], [7, 9, 12]] Otherwise, it turns out the proof of their existence is highly constructive -- just check the given constructions are valid -- which makes it really easy to implement (see the ebook [A short course in Combinatorial Designs, by Ian Anderson and Iiro Honkala][4]). Nathann [1]: http://www.sagemath.org/ [2]: http://trac.sagemath.org/sage_trac/ticket/8745 [3]: http://www.math.ucla.edu/~jimc/mathnet_d/sage/reference/sage/combinat/designs/block_design.html#sage.combinat.designs.block_design.steiner_triple_system [4]: http://www.utu.fi/~honkala/designs.ps