OFFSET
0,2
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 0..1000
FORMULA
a(n) = ceiling( a(n-1)*log_5(10) ). - Max Alekseyev, May 14 2009
EXAMPLE
Start from 0;
0 + 5^(-1) = 0.2;
0.2 + 5^(-2) = 0.24 (first digit "2" is equal to the previous number's digit after the decimal point);
0.24 + 5^(-3) = 0.248 (first digits "24" are equal to the previous number's digits after the decimal point);
0.248 + 5^(-5) = 0.24832 (first digits "248" are equal to the previous number's digits after the decimal point);
etc.
MATHEMATICA
Join[{1}, a=1; a=Table[a=Ceiling[a Log[5, 10]], {n, 40}]] (* Vincenzo Librandi, Jul 05 2019 *)
PROG
(Magma) [n eq 1 select 1 else Ceiling(Self(n-1)*Log(5, 10)): n in [1..50]]; // Vincenzo Librandi, Jul 05 2019
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Paolo P. Lava and Giorgio Balzarotti, Mar 19 2008
EXTENSIONS
Extended by Max Alekseyev, May 14 2009
STATUS
approved