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.

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

This page as a plain text file.
%I A171154 #18 Mar 13 2022 06:03:56
%S A171154 2,3203,5323,75323,11753221,131175329,171311753203,19171311753229,
%T A171154 231917131175321,292319171311753231,3129231917131175327,
%U A171154 3731292319171311753239,41373129231917131175321,43413731292319171311753233,4743413731292319171311753269,534743413731292319171311753223
%N A171154 Smallest prime whose decimal expansion begins with concatenation of first n primes in descending order.
%C A171154 Sequence is conjectured to be infinite.
%C A171154 a(n) = "prime(n)...prime(1) R(n)".
%C A171154 R(n) for n>1: 03, 3, 3, 21, 9, 03, 29, 1, 31, 7, 39, 1, 33, 69, 23, 3, 59, 27, ...
%C A171154 It is conjectured that R(n)=1 for infinite many n.
%D A171154 Leonard E. Dickson, History of the Theory of numbers, vol. I, Dover Publications 2005.
%H A171154 Michael S. Branicky, <a href="/A171154/b171154.txt">Table of n, a(n) for n = 1..298</a>
%e A171154 a(1) = 2 = prime(1) is the exceptional case, because no R(1).
%e A171154 a(2) = 3203 = prime(453) = "32 03", R(2)="03".
%e A171154 a(5) = 11753221 = prime(772902) = "prime(5)...prime(1) 21", R(5)=21.
%o A171154 (Python)
%o A171154 from sympy import isprime, primerange, prime
%o A171154 def a(n):
%o A171154     if n == 1: return 2
%o A171154     c = int("".join(map(str, [p for p in primerange(2, prime(n)+1)][::-1])))
%o A171154     pow10 = 10
%o A171154     while True:
%o A171154         c *= 10
%o A171154         for b in range(1, pow10, 2):
%o A171154             if b%5 == 0: continue
%o A171154             if isprime(c+b):
%o A171154                 return c+b
%o A171154         pow10 *= 10
%o A171154 print([a(n) for n in range(1, 17)]) # _Michael S. Branicky_, Mar 12 2022
%Y A171154 Cf. A000040, A066065, A019518, A089710, A053546.
%K A171154 nonn,base
%O A171154 1,1
%A A171154 Ulrich Krug (leuchtfeuer37(AT)gmx.de), Dec 04 2009
%E A171154 a(14) and beyond from _Michael S. Branicky_, Mar 12 2022