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.

A342214 Primes formed by the concatenation of exactly three successive composite numbers.

This page as a plain text file.
%I A342214 #39 May 06 2022 13:13:51
%S A342214 138140141,180182183,240242243,250252253,330332333,400402403,
%T A342214 408410411,478480481,546548549,570572573,600602603,646648649,
%U A342214 660662663,676678679,768770771,838840841,876878879,928930931,940942943,970972973,996998999,100810101011,109610981099
%N A342214 Primes formed by the concatenation of exactly three successive composite numbers.
%C A342214 The primes that are obtained by the concatenation of exactly three successive composite numbers are always of the form c||c+2||c+3, with c+1 prime and c+3 odd <> 5, hence c must necessary ends with 0, 6, 8 (see examples).
%C A342214 No such primes can be obtained with the two other possible configurations of 3 successive composite numbers: c||c+1||c+2 or c||c+1||c+3.
%C A342214 The number of digits in each term is a multiple of 3. If a term existed for which this were not true, then c would necessarily be of the form 10^k - 2 (A099150), but then c+1 = 10^k - 1 would not be prime.
%H A342214 Jon E. Schoenfield, <a href="/A342214/b342214.txt">Table of n, a(n) for n = 1..10000</a>
%H A342214 G. L. Honaker, Jr. and Chris Caldwell, <a href="https://primes.utm.edu/curios/page.php/138140141.html">Prime Curios! 138140141</a>.
%e A342214 a(1) = 138140141 because 138, 140, 141 are 3 successive composite numbers, then concat(138, 140, 141) = 138140141 is prime and is the least prime with this property (see link Prime Curios!).
%e A342214 The smallest such primes whose first composite ends respectively with 0, 6, 8 are: a(2) = 180182183, a(9) = 546548549, a(1) = 138140141.
%e A342214 If (3,q) is the smallest term formed by the concatenation of 3 successive composite numbers with each q digits: (3,3) = a(1) = 138140141, (3,4) = a(22) = 100810101011.
%t A342214 nextc[n_] := Module[{k = n + 1}, While[PrimeQ[k], k++]; k]; seq = {}; n1 = 4; n2 = nextc[n1]; Do[n3 = nextc[n2]; c = FromDigits @ Flatten @ Join[IntegerDigits /@ {n1, n2, n3}]; If[PrimeQ[c], AppendTo[seq, c]]; n1 = n2; n2 = n3, {1000}]; seq (* _Amiram Eldar_, Mar 05 2021 *)
%o A342214 (PARI) lista(nn) = {my(ca=4, cb=6); forcomposite(c=7, nn, if (isprime(x=eval(concat(Str(ca), concat(Str(cb), Str(c))))), print1(x, ", ")); ca = cb; cb = c;);} \\ _Michel Marcus_, Mar 05 2021
%o A342214 (Python)
%o A342214 from sympy import isprime
%o A342214 def aupto(limit):
%o A342214   c, t, alst = 6, 689, []
%o A342214   while t < limit:
%o A342214     t = int("".join(map(str, [c, c+2, c+3])))
%o A342214     if isprime(c+1) and not isprime(c+3) and isprime(t): alst.append(t)
%o A342214     c += [6, 4, 2, 2, 2][(c%10)//2]
%o A342214   return alst
%o A342214 print(aupto(109610981099)) # _Michael S. Branicky_, Mar 05 2021
%Y A342214 Cf. A087341, A281684, A342049 (similar, with 2 consecutive composites).
%K A342214 nonn,base
%O A342214 1,1
%A A342214 _Bernard Schott_, Mar 05 2021