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.

A110772 Beginning with 2, least number not occurring earlier such that every partial concatenation is prime.

This page as a plain text file.
%I A110772 #18 May 11 2023 12:47:29
%S A110772 2,3,9,11,13,63,51,29,69,33,49,159,17,37,39,117,53,43,47,31,23,97,171,
%T A110772 89,367,347,157,83,447,19,249,153,233,163,141,317,471,391,107,93,261,
%U A110772 339,183,87,403,129,81,173,411,57,177,109,71,121,269,609,111,1413,99,21
%N A110772 Beginning with 2, least number not occurring earlier such that every partial concatenation is prime.
%C A110772 Conjecture: every odd number not divisible by 5 is a member.
%H A110772 Michael S. Branicky, <a href="/A110772/b110772.txt">Table of n, a(n) for n = 1..1078</a>
%e A110772 2, 23, 239, 23911, 2391113, ... etc. are all prime.
%p A110772 L:=[2]: for n from 1 to 120 do for m from 1 do if isprime(parse(cat("",op(L),m))) and not member(m,L) then L:=[op(L),m]; break fi od od: L[]; # Alec Mihailovs, Aug 14 2005
%t A110772 a[1]=2;a[n_]:=a[n]=Block[{t=1},While[!PrimeQ[FromDigits@Flatten[IntegerDigits/@Join[Array[a,n-1],{t}]]]||MemberQ[Array[a,n-1],t],t++];t];Array[a,60] (* _Giorgos Kalogeropoulos_, May 07 2023 *)
%o A110772 (Python)
%o A110772 from gmpy2 import is_prime
%o A110772 from itertools import count, islice
%o A110772 def agen(): # generator of terms
%o A110772     an, s, aset, mink = 2, "2", {2}, 3
%o A110772     while True:
%o A110772         yield an
%o A110772         an = next(k for k in count(mink, 2) if k not in aset and is_prime(int(s+str(k))))
%o A110772         s += str(an)
%o A110772         aset.add(an)
%o A110772         while mink in aset: mink += 2
%o A110772 print(list(islice(agen(), 60))) # _Michael S. Branicky_, May 11 2023
%Y A110772 Cf. A089564, A110773.
%K A110772 easy,nonn,base
%O A110772 1,1
%A A110772 _Amarnath Murthy_, Aug 12 2005
%E A110772 More terms from Alec Mihailovs (alec(AT)mihailovs.com), Aug 14 2005
%E A110772 Edited by _Charles R Greathouse IV_, Apr 27 2010