getTypesOfPrimes[primes_, primeTypes_] := For[i=0, i < Length[primes], i++, Print["Number ", primes[i]]; For[j=0, j < Length[primeTypes], j++, If[primeTypes[j][primes[i]], Print["Type ", j]]]]
Упс,
getTypesOfPrimes[primes_, primeTypes_] := For[i = 1, i <= Length[primes], i++, Print["Number ", Extract[primes, i]]; For[j = 1, j <= Length[primeTypes], j++, If[Extract[primeTypes, j][Extract[primes, i]], Print["Type ", j]]]].