login
a(1) = 5; a(n) = smallest power of 5 (larger than a(n-1)) with a(n-1) forming its final digits.
0

%I #16 Mar 07 2023 02:41:42

%S 5,25,125,3125,1953125,45474735088646411895751953125

%N a(1) = 5; a(n) = smallest power of 5 (larger than a(n-1)) with a(n-1) forming its final digits.

%C a(7) > 5^50000. - _Klaus Brockhaus_, Jun 03 2001

%C a(7) = 5^134217769. - _Sean A. Irvine_, Mar 06 2023

%H <a href="/index/Fi#final">Index entries for sequences related to final digits of numbers</a>

%e After 3125 = 5^5 the next term is 1953125 = 5^9, containing 3125 as its final digits.

%o (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;

%K nonn,base

%O 1,1

%A _Amarnath Murthy_, May 29 2001

%E Description corrected by and one more term from _Klaus Brockhaus_, Jun 03 2001

%E a(6) also found by _Frank Ellermann_, Jun 04 2001