/* Predicate functions that checks wether an integer is a Blum integer or not */ blum_p(n):=lambda([x],length(ifactors(x))=2 and unique(map(second,ifactors(x)))=[1] and mod(ifactors(x)[1][1],4)=3 and mod(ifactors(x)[2][1],4)=3)(n)$ /* Function that returns a list of the first len Blum integers */ blum_count(len):=block( [i:1,count:0,result:[]], while count