Generate all concatenations of each pair of primes
for ( int i = 0 ; i < initial . Count ; i ++ ) { for ( int j = 0 ; j < initial . Count ; j ++ ) { int a = initial [ i ] ; int b = initial [ j ] ; if ( a != b ) { int C = join ( a , b ) ; now . Add ( C ) ; } } }