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.

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

A085324 a(n) is the least exponent so that reverse(n^a(n)) is a prime number. a(n)=0 if no such exponent exists, namely when e.g., n = 3k or n = 11k, k > 1.

Original entry on oeis.org

0, 1, 1, 2, 1, 0, 1, 8, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 2, 1, 0, 0, 8, 0, 13, 47, 0, 2, 7, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 2, 2, 0, 5, 0, 0, 22, 15, 0, 6, 1, 0, 3, 10, 0, 0, 143, 0, 88, 12, 0, 4, 2, 0, 4, 8, 0, 39, 83, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 8, 0, 6, 11, 0, 2, 28, 0, 0, 2, 0, 1, 1, 0, 292, 1, 0, 1, 1
Offset: 1

Views

Author

Labos Elemer, Jul 02 2003

Keywords

Comments

a(k) = 1 for k in A095179. - Michel Marcus, Apr 09 2018

Examples

			For n=46, a(46)=22 means that reversion of 46^22 gives a prime: 6100744433653913942689966672393877083.
		

Crossrefs

Programs

  • Maple
    Rev:= proc(n) local L;
    L:= convert(n,base,10);
    add(L[-i]*10^(i-1),i=1..nops(L))
    end proc:
    f:= proc(n) local k;
      if igcd(n,33) <> 1  then return 0 fi;
      if n mod 10 = 0 then return procname(n/10) fi;
      for k from 1 do if isprime(Rev(n^k)) then return k fi od:
    end proc:
    f(1):= 0: f(3):= 1; f(11):= 1;
    map(f, [$1..100]); # Robert Israel, Apr 09 2018
  • Mathematica
    nd[x_, y_] := 10*x+y; tn[x_] := Fold[nd, 0, x]; bac[x_] := tn[Reverse[IntegerDigits[x]]] t={list without 3k and 11k numbers}; le=Length[t]; Table[f=1; Do[s=bac[Part[t, n]^k]; If[PrimeQ[s]&&Equal[f, 1], Print[{k, Part[t, n], s}]; f=0], {k, 1, 300}], {n, 1, le}]

Formula

a(3k) = a(11k) = 0 for k > 1 because reversion does not make a prime from any of their powers.

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

A085326 a(n)=p is smallest prime such that rev(p)=n^j with some exponent, or 0 if no such prime exists [when e.g. n=1,n=3k or n=11k, k>1].

Original entry on oeis.org

0, 2, 3, 61, 5, 0, 7, 61277761, 0, 0, 11, 0, 31, 41, 0, 61, 71, 0, 163, 2, 0, 0, 18258901387, 0, 5265674839116110941, 6716872795737314976899264656807717363719079328404119318887571869813, 0
Offset: 1

Views

Author

Labos Elemer, Jul 03 2003

Keywords

Examples

			n=86: a(86)=6505868216024313214870917495263873755562243530151045641,
and rev[86]=86^28.
		

Crossrefs

Showing 1-4 of 4 results.