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.

A235923 Minimal k > 1 such that the base-k representation of the n-th Ramanujan prime (A104272), read in decimal, is also a Ramanujan prime.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Jan 17 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.
However note that, already for the eleventh Ramanujan prime 101 the binary representation, read in decimal, is rather large prime: 1100101. We cannot decide, if it is a Ramanujan prime, using b-file in A104272. Therefore, the calculation of the sequence here ends off. It is a general problem: how to decide, if a large prime is a Ramanujan one?

Examples

			The third Ramanujan prime is 17. If k=2, we have 10001, if k=3, we have 122, if k=4, we have 101. In this list, read in decimal, 101 is the first prime. Since 101 is a Ramanujan prime, then a(3)=4.
		

Crossrefs

Programs

  • PARI
    ramanujan_prime_list(n) = {my(L=vector(n), s=0, k=1); for(k=1, prime(3*n)-1, if(isprime(k), s++); if(k%2==0 && isprime(k/2), s--); if(sA104272
    a(n, vp, pmax) = {my(p=vp[n], d, np); for (b=2, 10, d = digits(p, b); np = fromdigits(d, 10); if (np > pmax, return (0)); if (vecsearch(vp, np), return (b)););}
    lista(nn) = {my(vp = ramanujan_prime_list(nn), pmax = vecmax(vp)); for (n=1, nn, my(result = a(n, vp, pmax)); if (result, print1(result, ", "), break););} \\ use nn=10^7 to get 42 terms \\ Michel Marcus, Dec 17 2018

Extensions

a(11)-a(42) from Michel Marcus, Dec 17 2018