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.

Showing 1-4 of 4 results.

A058993 Numbers m such that 5^m reversed is a prime.

Original entry on oeis.org

1, 3, 26, 36, 43, 66, 76, 149, 511, 885, 3767, 18157, 20516, 26316
Offset: 1

Views

Author

Robert G. Wilson v, Jan 17 2001

Keywords

Crossrefs

Numbers m such that k^m reversed is prime: A057708 (k=2), A350441 (k=4), this sequence (k=5), A058994 (k=7), A350442 (k=8), A058995 (k=13).

Programs

  • Mathematica
    Do[ If[ PrimeQ[ ToExpression[ StringReverse[ ToString[5^n] ] ] ], Print[n] ], {n, 1, 3000} ]
  • PARI
    isok(m) = isprime(fromdigits(Vecrev(digits(5^m)))) \\ Mohammed Yaseen, Jul 20 2022
  • Python
    from sympy import isprime
    k, m, A058993_list = 1, 5,  []
    while k <= 10**3:
        if isprime(int(str(m)[::-1])):
            A058993_list.append(k)
        k += 1
        m *= 5 # Chai Wah Wu, Mar 09 2021
    

Extensions

a(12)-a(14) from Michael S. Branicky, Apr 01 2023

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 *)

A071586 Powers of 8 written backwards.

Original entry on oeis.org

1, 8, 46, 215, 6904, 86723, 441262, 2517902, 61277761, 827712431, 4281473701, 2954399858, 63767491786, 888318557945, 4011156408934, 23888027348153, 656017679474182, 8425863189971522, 48918490589341081, 278558570881511441
Offset: 0

Views

Author

Benoit Cloitre, Jun 01 2002

Keywords

Crossrefs

Programs

  • PARI
    for(i=1,50,n=8^i; s=ceil(log(n)/log(10)); print1(sum(i=0,s,10^(s-i-1)*(floor(n/10^i)-10*floor(n/10^(i+1)))),","))

A071588 Powers of 6 written backwards.

Original entry on oeis.org

1, 6, 63, 612, 6921, 6777, 65664, 639972, 6169761, 69677001, 67166406, 650797263, 6332876712, 61049606031, 69046146387, 675489481074, 6547099011282, 63744495662961, 614866659955101, 694010047953906, 6792600448516563
Offset: 0

Views

Author

Benoit Cloitre, Jun 01 2002

Keywords

Crossrefs

Programs

  • Mathematica
    FromDigits[Reverse[IntegerDigits[#]]]&/@(6^Range[0,30]) (* Harvey P. Dale, Feb 02 2012 *)
  • PARI
    for(i=1,50,n=5^i; s=ceil(log(n)/log(10)); print1(sum(i=0,s,10^(s-i-1)*(floor(n/10^i)-10*floor(n/10^(i+1)))),","))

Formula

a(n) = A004086(A000400(n)).
Showing 1-4 of 4 results.