cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A158624 Upper limit of backward value of 5^n.

Original entry on oeis.org

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
Offset: 0

Views

Author

Simon Plouffe, Mar 23 2009

Keywords

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.

Examples

			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...
		

Crossrefs

Programs

  • Magma
    D:=87; e:=6; for d in [2..D-1] do t:=Modexp(5, e, 10^(d+1)); if t div 10^d lt 5 then e+:=2^(d-2); end if; end for; t:=Modexp(5, e, 10^D); IntegerToSequence(t, 10); // Jon E. Schoenfield, Feb 07 2018
  • Maple
    A158624:= proc(N)
    local m,n,A;
    m[2]:= 3;
    for n from 3 to N do
      A:= 5&^m[n-1] mod 10^n;
      if A > 5*10^(n-1) then m[n]:= m[n-1]
      else m[n]:= m[n-1]+2^(n-3)
      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[n-1], 10^n]; If[ a > 5*10^(n-1), m[n] = m[n-1], m[n] = m[n-1] + 2^(n-3)]]; IntegerDigits[PowerMod[5, m[k], 10^k]] // Reverse]; A158624[105] (* Jean-François Alcover, Dec 21 2012, translated from Robert Israel's Maple program *)