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

A066064 a(n) = p.q in decimal notation where p = prime(n) and q is the smallest prime (A066065(n)) such that the concatenation p.q is a prime.

Original entry on oeis.org

23, 37, 53, 73, 113, 137, 173, 193, 233, 293, 313, 373, 4111, 433, 4723, 5323, 593, 613, 673, 7129, 733, 797, 8311, 8923, 977, 1013, 1033, 10711, 1093, 11311, 1277, 13147, 1373, 13913, 1493, 15131, 15731, 1637, 16729, 1733, 17911, 18119, 1913
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 01 2001

Keywords

Examples

			A000040(2) = 3 and as 32, 33 and 35 are composite, the next prime 7 = A066065(2) yields a(2) = 37.
		

Crossrefs

Cf. A066065.

Programs

  • Mathematica
    Table[Block[{q = 3, d = IntegerDigits[p], k}, While[! PrimeQ@ Set[k, FromDigits[Join[d, IntegerDigits[q]]]], q = NextPrime@ q]; k], {p, Prime@ Range@ 43}] (* Michael De Vlieger, Jun 19 2018 *)
  • PARI
    a(n) = { my(p=prime(n)); forprime(q=3, oo, my(c=p*10^(logint(q,10)+1) + q); if(isprime(c), return(c))) } \\ Harry J. Smith, Nov 09 2009

A171154 Smallest prime whose decimal expansion begins with concatenation of first n primes in descending order.

Original entry on oeis.org

2, 3203, 5323, 75323, 11753221, 131175329, 171311753203, 19171311753229, 231917131175321, 292319171311753231, 3129231917131175327, 3731292319171311753239, 41373129231917131175321, 43413731292319171311753233, 4743413731292319171311753269, 534743413731292319171311753223
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 04 2009

Keywords

Comments

Sequence is conjectured to be infinite.
a(n) = "prime(n)...prime(1) R(n)".
R(n) for n>1: 03, 3, 3, 21, 9, 03, 29, 1, 31, 7, 39, 1, 33, 69, 23, 3, 59, 27, ...
It is conjectured that R(n)=1 for infinite many n.

Examples

			a(1) = 2 = prime(1) is the exceptional case, because no R(1).
a(2) = 3203 = prime(453) = "32 03", R(2)="03".
a(5) = 11753221 = prime(772902) = "prime(5)...prime(1) 21", R(5)=21.
		

References

  • Leonard E. Dickson, History of the Theory of numbers, vol. I, Dover Publications 2005.

Crossrefs

Programs

  • Python
    from sympy import isprime, primerange, prime
    def a(n):
        if n == 1: return 2
        c = int("".join(map(str, [p for p in primerange(2, prime(n)+1)][::-1])))
        pow10 = 10
        while True:
            c *= 10
            for b in range(1, pow10, 2):
                if b%5 == 0: continue
                if isprime(c+b):
                    return c+b
            pow10 *= 10
    print([a(n) for n in range(1, 17)]) # Michael S. Branicky, Mar 12 2022

Extensions

a(14) and beyond from Michael S. Branicky, Mar 12 2022
Showing 1-2 of 2 results.