### Random Post

### Recent Posts

### Recent Comments

Jim Randell on Tantalizer 452: Snailspaces | |

Brian Gladman on Enigma 1061: Par is never… | |

Hugh Casement on Enigma 1061: Par is never… | |

Jim Randell on Enigma 1061: Par is never… | |

geoffrounce on Puzzle 47: Digits all wro… |

### Archives

### Categories

- article (11)
- enigma (1,175)
- misc (2)
- project euler (2)
- puzzle (44)
- site news (46)
- tantalizer (48)
- teaser (3)

### Site Stats

- 183,007 hits

Advertisements

The following Python program uses the prime sieve from the

enigma.pylibrary. It runs in 45ms.Solution:The three numbers are 487, 503 and 961.Here is my effort:

Greetings Brian,

You have done good and understandable work.

Your program gives the triples numbers for the sums 1951, 1453, 1881 correctly when I try it for each.

How can one modified your program to output the triple numbers for any sum, if possible,

for the same enigma (two primes, one perfect number, 9 different digits, no same digit).

The best way to do this depends on how big the sum can be. If it has to be up to 9 digits, my simple prime sieve would have to be changed to give much larger primes. Apart from this the various fixed limits would need to be set from the sum value (the limits are hard coded right now). This would be easy if the maximum sum allowed was not too large.