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-3 of 3 results.

A085298 a(n) is the smallest exponent x such that prime(n)^x when reversed is a prime.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 8, 7, 1, 1, 2, 5, 15, 10, 12, 4, 39, 1, 1, 1, 11, 2, 1, 1, 10, 1, 23, 1, 5, 1, 243, 2, 1, 1, 1, 23, 1, 34, 1, 1, 1, 2, 58, 1, 3, 9, 166, 17, 68, 8, 8, 3, 7, 5, 5, 2, 2, 2, 61, 11, 97, 1, 1, 10, 2, 1, 1, 41, 1, 1, 66, 1, 5, 1, 1, 2, 2, 8, 40, 2, 8, 19, 2, 2, 723
Offset: 1

Views

Author

Labos Elemer, Jun 24 2003

Keywords

Comments

It is conjectured that for every n such exponent exists.

Examples

			a(n)=1 means that rev(prime(n)) is prime i.e. prime(n) is in A007500;
a(n)=2 means that rev(prime(n)^2) is prime but rev(prime(n)) is not, like n=8:p=19 and 91 is not a prime but rev[19^2]=rev[361]=163 is a prime;
For n, the first k exponent providing rev(prime(n)^k) prime can be quite large, like at n=87: rev(p(87)^723)=rev(449^723) is the first [probably] prime has 1918 decimal digits: 948......573.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local k, p; p:= ithprime(n); for k while not isprime((s->
          parse(cat(seq(s[-i], i=1..length(s)))))(""||(p^k))) do od; k
        end:
    seq(a(n), n=1..50);  # Alois P. Heinz, Sep 04 2019
  • Mathematica
    a[n_] := Block[{k = 1}, While[! PrimeQ@ FromDigits@ Reverse@ IntegerDigits[ Prime[n]^k], k++]; k]; Array[a, 87] (* Giovanni Resta, Sep 04 2019 *)
  • PARI
    a(n) = {my(x=1, p=prime(n)); while (!ispseudoprime(fromdigits(Vecrev(digits(p^x)))), x++); x;} \\ Michel Marcus, Sep 04 2019

Formula

a(n) = Min{x; reversed(prime(n)^x) is a prime}.

A085300 a(n) is the least prime x such that when reversed it is a power of prime(n).

Original entry on oeis.org

2, 3, 5, 7, 11, 31, 71, 163, 18258901387, 90367894271, 13, 73, 1861, 344800741, 34351783286302805384336021, 940315563074788471, 1886172359328147919771, 14854831
Offset: 1

Views

Author

Labos Elemer, Jun 24 2003

Keywords

Comments

A006567 (after rearranging terms) and A002385 are subsequences. - Chai Wah Wu, Jun 02 2016

Examples

			a(14)=344800741 means that 147008443=43^5=p(14)^5, where 5 is the smallest such exponent;
a(19) has 82 decimal digits and if reversed equals 39th power of p(19)=67.
		

Crossrefs

Programs

  • Python
    from sympy import prime, isprime
    def A085300(n):
        p = prime(n)
        q = p
        while True:
            m = int(str(q)[::-1])
            if isprime(m):
                return(m)
            q *= p # Chai Wah Wu, Jun 02 2016

A085299 a(n) is the smallest number x such that A085298[x]=n, or 0 if no such number exists.

Original entry on oeis.org

1, 8, 47, 18, 14, 89, 10, 9, 48, 16, 23, 17, 168, 268, 15, 661, 50, 380, 84, 116, 360, 245, 29, 144, 345, 227, 785, 261, 148, 235, 691, 658, 638, 40, 1023, 674, 1529, 210, 19, 81, 181, 428, 170, 1130, 2322, 406, 600, 373, 958, 217
Offset: 1

Views

Author

Labos Elemer, Jun 24 2003

Keywords

Examples

			a(13) = 168 means that 13 is the smallest exponent such that reversed[p(168)^13] = reversed[997^13] = 776831144302925059735912605306533496169
is prime if read in this direction and 13th prime-power if read backwards.
		

Crossrefs

Showing 1-3 of 3 results.