← RoseCode

ROSECODE 223

P-automorphic numbers

Philippe_57721 · Programming ·

A number is p-automorphic if the last digits of its p-th power are the number itself.

For instance 68751 is a 3-automorphic number:
68751^3 = 324965351768751

There are 10 10-digits 6-automorphic numbers :
  • 1787109376^6 =        32576678364650828374994886894920831594093799601787109376
  • 2000000001^6 =        64000000192000000240000000160000000060000000012000000001
  • 3787109376^6 = 2950170318650991258032575341918572870335539112113787109376
  • 4000000001^6 = 4096000006144000003840000001280000000240000000024000000001
  • 5787109376^6 = 37563853963345670599003034369316678034196984424625787109376
  • 6000000001^6 = 46656000046656000019440000004320000000540000000036000000001
  • 7787109376^6 = 222975757734371332908041996970049236323178429737137787109376
  • 8000000001^6 = 262144000196608000061440000010240000000960000000048000000001
  • 8212890625^6 = 306885405287085842075678332463439801358617842197418212890625
  • 9787109376^6 = 878874068949224372247665088145076247737279875049649787109376

How many 50-digits 73-automorphic numbers are there?

Answer format: count,sum

Example: 10,57148437509 // For 10-digits 6-automorphic numbers.

[My timing: 3 sec]