Sorry, it has been a while since I posted this entry and I had no memory whatsoever of the problem! Checking on Robin’s blog entry, I have realised I omitted the multiplication by 7. The question now stands corrected, thank you!

]]>Thank you!

]]>library(gregmisc)

mysets <-permutations(9, 4)

universe.sol<-mysets%*%10^(3:0)

possible.sol<-intersect(7*11*3*c(10:30),universe.sol)

# now check these 7 possibilities

for(i in 1:length(possible.sol)){

if(possible.sol[i]==231*sum(as.numeric(unlist(strsplit(as.character(possible.sol[i]),NULL)))))

print(possible.sol[i])

}