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.

A052033 Primes base 10 that are never primes in any smaller base b, 2<=b<10, expansions interpreted as decimal numbers.

Original entry on oeis.org

263, 269, 347, 397, 431, 461, 479, 499, 569, 599, 607, 677, 683, 719, 769, 797, 821, 929, 941, 1019, 1031, 1049, 1051, 1061, 1069, 1103, 1181, 1223, 1229, 1237, 1297, 1307, 1367, 1399, 1409, 1439, 1453, 1487, 1489, 1523, 1553, 1559, 1571, 1619, 1637
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1999

Keywords

Crossrefs

Programs

A235354 Minimal k > 1 such that the base-k representation of the n-th prime, read in decimal, is also prime.

Original entry on oeis.org

3, 2, 2, 4, 4, 4, 4, 4, 2, 4, 7, 4, 5, 4, 2, 4, 7, 4, 3, 4, 4, 3, 4, 2, 4, 2, 3, 4, 4, 4, 6, 4, 8, 3, 2, 4, 2, 2, 4, 2, 2, 3, 4, 3, 4, 2, 3, 8, 4, 2, 4, 7, 4, 4, 8, 10, 10, 9, 3, 5, 3, 4, 3, 4, 2, 4, 2, 6, 10, 3, 7, 4, 2, 3, 2, 2, 4, 10, 4, 3, 4, 3, 10, 3, 3
Offset: 1

Views

Author

Vladimir Shevelev, Jan 07 2014

Keywords

Comments

Conjecture 1. Every number 2, ..., 10 occurs infinitely many times.
Conjecture 2. There exists limit of average (a(1) + ... + a(n))/n.
Conjecture: The average in Conjecture 2 exists and is equal to 10. - Charles R Greathouse IV, Jan 08 2014

Examples

			Prime(7) = 17. The base 2 representation of 17 is 10001, which reinterpreted in decimal is 73 * 137; the base 3 representation of 17 is 122, which reread as decimal is 2 * 61; and the base 4 representation of 17 is 101, which reread as decimal is prime, so therefore a(7) = 4.
		

Crossrefs

Programs

  • Mathematica
    Table[Module[{b=2},While[!PrimeQ[FromDigits[IntegerDigits[p,b]]],b++];b],{p,Prime[Range[90]]}] (* Harvey P. Dale, Aug 30 2025 *)
  • PARI
    rebase(n,from,to=10)=subst(Pol(digits(n,from)),'x,to)
    a(n)=my(p=prime(n)); for(b=2,9,if(isprime(rebase(p,b)),return(b))); 10 \\ Charles R Greathouse IV, Jan 08 2014

Extensions

More terms from Peter J. C. Moses

A236174 Maximal prime among the base-k representations of the n-th prime, read in decimal, for k=2,3,...,10.

Original entry on oeis.org

2, 11, 101, 13, 23, 31, 101, 103, 10111, 131, 43, 211, 131, 223, 101111, 311, 113, 331, 2111, 1013, 1021, 2221, 1103, 1011001, 1201, 1100101, 10211, 1223, 1231, 1301, 331, 2003, 211, 12011, 10010101, 2113, 10011101, 10100011, 2213, 10101101, 10110011, 20201, 2333, 21011, 3011, 11000111, 21211, 337, 3203, 11100101
Offset: 1

Views

Author

Vladimir Shevelev, Jan 19 2014

Keywords

Comments

Let p = n-th prime. Write p in base k, k=2,3,4,5,..., and stop when the result is a prime when looked at in base 10. - N. J. A. Sloane, Jan 25 2014

Examples

			Let n=10, then prime(n)=29 (in base 10). The representations of 29 in bases 2,3,4,...,10 are 11101,1002,131,...,29 respectively. In this list 131 is the first and therefore the maximal prime. Thus a(10)=131.
		

Crossrefs

Programs

  • Mathematica
    Map[First[First[Select[Map[{#,PrimeQ[#]}&,Map[FromDigits,IntegerDigits[Prime[#],Range[2,10]]]],#[[2]]==True&]]]&,Range[50]]
    Table[SelectFirst[Table[FromDigits[IntegerDigits[Prime[n],b]],{b,2,10}],PrimeQ],{n,80}] (* Harvey P. Dale, May 17 2024 *)
  • PARI
    base_b(n, b) = {
      my(s=[], r, x);
      while(n>0,
        r = n%b;
        n = n\b;
        s = concat(r, s)
      );
      x=10;
      eval(Pol(s))
    }
    A236174(maxp) = {
      my(s=[], b, t);
      forprime(p=2, maxp,
        for(b=2, 10,
          t=base_b(p, b);
          if(isprime(t), s=concat(s, t); break)
        )
      );
      s
    } \\ Colin Barker, Jan 23 2014
    
  • Python
    from sympy import prime, isprime
    def A236174(n):
        p = prime(n)
        for b in range(2,11):
            x, y, z = p, 0, 1
            while x >= b:
                x, r = divmod(x,b)
                y += r*z
                z *= 10
            y += x*z
            if isprime(y):
                return y # Chai Wah Wu, Jan 03 2015

A236437 Primes which occur in their proper place in A236174.

Original entry on oeis.org

2, 263, 269, 347, 397, 431, 461, 479, 499, 569, 599, 607, 677, 683, 719, 769, 797, 821, 929, 941, 1019, 1031, 1049, 1051, 1061, 1069, 1103, 1181, 1223, 1229, 1237, 1297, 1307, 1367, 1399, 1409, 1439, 1453, 1487, 1489, 1523, 1553, 1559, 1571, 1619, 1637, 1733, 1759, 1811, 1823, 1949, 1973, 1997
Offset: 1

Views

Author

N. J. A. Sloane, Jan 25 2014

Keywords

Comments

Primes p such that A236174(k) = prime(k) for some k. The values of k are (essentially) given in A235377.
Same as A052033 if the initial 2 is omitted.

Examples

			263 is the 56th prime and is also the 56th term in A236174.
		

Crossrefs

Programs

  • Python
    from sympy import prime, isprime
    def A236174(n):
        p = prime(n)
        for b in range(2,11):
            x, y, z = p, 0, 1
            while x >= b:
                x, r = divmod(x,b)
                y += r*z
                z *= 10
            y += x*z
            if isprime(y):
                return y
    A236437_list = [prime(n) for n in range(1,10**6) if A236174(n) == prime(n)]
    # Chai Wah Wu, Jan 03 2015
Showing 1-4 of 4 results.