← Complete problem index

PROJECT EULER · #0455

Powers with Trailing Digits

Statement only · SolvedOriginal problem ↗

Let f(n) be the largest positive integer x less than 109 such that the last 9 digits of nx form the number x (including leading zeros), or zero if no such integer exists.

For example:

  • f(4)=411728896 (4411728896=490411728896)
  • f(10)=0
  • f(157)=743757 (157743757=567000743757)
  • 2n103f(n)=442530011399

Find 2n106f(n).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.