If current element is Prime , then check for ( current element + 6 )
if ( Prime [ arr [ i ] ] ) { if ( arr [ i ] + 6 < freq . length && freq [ arr [ i ] + 6 ] > 0 && Prime [ arr [ i ] + 6 ] ) { count ++ ; } } }