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.

A372207 a(n) is the smallest prime number that is obtained by concatenating 2 consecutive n-digit integers.

This page as a plain text file.
%I A372207 #41 May 20 2024 16:51:12
%S A372207 23,1213,102101,10021001,1000810007,100010100011,10000241000023,
%T A372207 1000004210000041,100000002100000003,10000000081000000009,
%U A372207 1000000000810000000007,100000000002100000000001,10000000000021000000000001,1000000000001010000000000011,100000000000002100000000000003
%N A372207 a(n) is the smallest prime number that is obtained by concatenating 2 consecutive n-digit integers.
%C A372207 It is possible to form primes by concatenating an integer with its successor (A030458), as well as by concatenating an integer with its predecessor (A052089).
%H A372207 Michael S. Branicky, <a href="/A372207/b372207.txt">Table of n, a(n) for n = 1..500</a>
%e A372207 a(3) = 102101, since when concatenating 3-digit numbers, the first three numbers obtained, in increasing order, are 100101, 101100, 101102, which are composite, while the next number in the list is 102101, which is prime.
%o A372207 (Python)
%o A372207 from sympy import isprime
%o A372207 def a(n):
%o A372207     if n == 1: return 23
%o A372207     lb, ub = 10**(n-1), 10**n
%o A372207     for k in range(lb, ub, 2):
%o A372207         base = k*ub
%o A372207         for inc in [k-1, k+1]:
%o A372207             if inc >= lb and isprime(t:=base+inc):
%o A372207                 return t
%o A372207 print([a(n) for n in range(1, 16)]) # _Michael S. Branicky_, May 19 2024
%Y A372207 Cf. A030458, A052089.
%K A372207 nonn,base
%O A372207 1,1
%A A372207 _Gonzalo Martínez_, May 19 2024
%E A372207 a(12) and beyond from _Michael S. Branicky_, May 19 2024