Annual Appeal: Please make a donation (tax deductible in USA) to keep the OEIS running. Over 5000 articles have referenced us, often saying "we discovered this result with the help of the OEIS".
A061835
a(1) = 5; a(n) = smallest power of 5 (larger than a(n-1)) with a(n-1) forming its final digits.
After 3125 = 5^5 the next term is 1953125 = 5^9, containing 3125 as its final digits.
PROG
(ARIBAS) a := 5; n := 1; writeln("a(", n, ") = ", a); stop := 50000; run := true; c := 1; while run do b := a; len := length(itoa(b)); inc(n); a := 1; while a mod 10^len <> b and c <> stop do inc(c); a := 5^c; end; if c < stop then writeln("a(", n, ") = ", 5, "^", c, " = ", a); else writeln("a(", n, ") > ", 5, "^", c); run := false; end; end;