

A158624


Upper limit of backward value of 5^n.


5



5, 2, 6, 5, 6, 7, 9, 5, 7, 8, 7, 9, 6, 9, 9, 7, 6, 5, 7, 8, 8, 5, 5, 7, 6, 9, 7, 5, 9, 9, 5, 7, 8, 9, 5, 8, 6, 7, 7, 5, 6, 5, 6, 9, 5, 7, 5, 6, 6, 9, 6, 7, 7, 6, 7, 6, 8, 8, 5, 8, 5, 6, 7, 5, 8, 9, 6, 6, 7, 5, 9, 5, 7, 9, 8, 6, 8, 8, 7, 9, 5, 8, 8, 5, 8, 5, 9, 5, 5, 8, 9, 7, 7, 9, 7, 7, 9, 6, 7, 6, 8, 9, 7, 6, 6
(list;
constant;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,1


COMMENTS

Digits are all in {5,6,7,8,9} after 2nd term.
The other limit, related to odd n, is in A158625.
The first digit of the backward value of 5^n is always a(0)=5. The second digit is a(1)=2 from n=2 on. The third digit is a(2)=6 for all even n >= 4. The fourth digit is a(3)=5 for n=6+4k, k >= 0. The fifth digit is a(4)=6 for n=10+8k, k >= 0. The 6th digit is a(5)=7 for n=10+16k, k >= 0. The 7th digit is a(6)=9 for n=10+32k, k >= 0.


LINKS

Robert Israel, Table of n, a(n) for n = 0..999


EXAMPLE

5^3 = 125 so the backward value is 0.521, 5^10 = 9765625, so the backward value is 0.5265679. The upper limit of all values is a constant, which appears to be 0.5265679578796997657885576975995789586775656...


MAPLE

A158624:= proc(N)
local m, n, A;
m[2]:= 3;
for n from 3 to N do
A:= 5&^m[n1] mod 10^n;
if A > 5*10^(n1) then m[n]:= m[n1]
else m[n]:= m[n1]+2^(n3)
end if
end do:
convert(5&^m[N] mod 10^(N), base, 10);
end proc; # Robert Israel, Apr 01 2012


MATHEMATICA

A158624[k_] := Module[{m, n, a}, m[2] = 3; For[n = 3, n <= k, n++, a = PowerMod[5, m[n1], 10^n]; If[ a > 5*10^(n1), m[n] = m[n1], m[n] = m[n1] + 2^(n3)]]; IntegerDigits[PowerMod[5, m[k], 10^k]] // Reverse]; A158624[105] (* JeanFrançois Alcover, Dec 21 2012, translated from Robert Israel's Maple program *)


PROG

(Magma) D:=87; e:=6; for d in [2..D1] do t:=Modexp(5, e, 10^(d+1)); if t div 10^d lt 5 then e+:=2^(d2); end if; end for; t:=Modexp(5, e, 10^D); IntegerToSequence(t, 10); // Jon E. Schoenfield, Feb 07 2018


CROSSREFS

Cf. A158625, A071583, A145679.
Sequence in context: A211015 A077141 A276566 * A021659 A011506 A054400
Adjacent sequences: A158621 A158622 A158623 * A158625 A158626 A158627


KEYWORD

cons,nonn,base,nice


AUTHOR

Simon Plouffe, Mar 23 2009


STATUS

approved



