1 2 3 4 5 6 7 8 9 153 370 371 407 1634 8208 9474There is a finite number of A-numbers, this is because the magnitude of a number grows quicker then it's aSum so that after certain point, the aSum falls behind. The largest A-number is a level-39ner.
This code calculates all A-numbers up to level-39 with the following timings *:
Level-15 0 sec. 41 numbers Level-18 2 sec. 46 numbers Level-20 6 sec. 51 numbers Level-21 11 sec. 53 numbers Level-22 15 sec 53 numbers Level-23 21 sec. 58 numbers Level-25 46 sec 66 numbers Level-39 3518 sec. (58 min) 88 numbers * i7-4790K CPU @ 4.00GHz
Please see my implementation: https://github.com/shamily/ArmstrongNumbers
ReplyDelete(Seems like for 88 BigIntegers it works faster ;) )