Note: The counting functions (can be run via JS Console) are R1(n,k) for bit strings and R2(n,k) for digit strings