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.

A062115 Numbers with no prime substring in their decimal expansion.

This page as a plain text file.
%I A062115 #48 Aug 06 2024 09:16:24
%S A062115 0,1,4,6,8,9,10,14,16,18,40,44,46,48,49,60,64,66,68,69,80,81,84,86,88,
%T A062115 90,91,94,96,98,99,100,104,106,108,140,144,146,148,160,164,166,168,
%U A062115 169,180,184,186,188,400,404,406,408,440,444,446,448,460,464,466
%N A062115 Numbers with no prime substring in their decimal expansion.
%C A062115 This is a 10-automatic sequence, a consequence of the finitude of A071062. - _Charles R Greathouse IV_, Sep 27 2011
%C A062115 Subsequence of A202259 (right-truncatable nonprimes). Supersequence of A202262 (composite numbers in which all substrings are composite), A202265 (nonprime numbers in which all substrings and reversal substrings are nonprimes). - _Jaroslav Krizek_, Jan 28 2012
%H A062115 Reinhard Zumkeller, <a href="/A062115/b062115.txt">Table of n, a(n) for n = 1..10000</a>
%H A062115 Jeffrey Shallit, <a href="https://citeseerx.ist.psu.edu/pdf/854d085d8e5d5fb6957862851ad2a1f531ed2b9c">Minimal primes</a>, Journal of Recreational Mathematics 30:2 (1999-2000), pp. 113-117.
%H A062115 <a href="/index/Ar#10-automatic">Index entries for 10-automatic sequences</a>.
%F A062115 A039997(a(n)) = 0. - _Reinhard Zumkeller_, Jul 16 2007
%F A062115 From _Charles R Greathouse IV_, Mar 23 2010: (Start)
%F A062115 a(n) = O(n^(log_4 10)) = O(n^1.661) because numbers containing only 0,4,6,8 are in this sequence.
%F A062115 a(n) = Omega(n^(log_13637 1000000)) = Omega(n^1.451) for similar reasons; this bound can be increased by considering longer sequences of digits. (End)
%e A062115 25 is not included because 5 is prime.
%o A062115 (Haskell)
%o A062115 a062115 n = a062115_list !! (n-1)
%o A062115 a062115_list = filter ((== 0) . a039997) a084984_list
%o A062115 -- _Reinhard Zumkeller_, Jan 31 2012
%o A062115 (Python)
%o A062115 from sympy import isprime
%o A062115 def ok(n):
%o A062115     s = str(n)
%o A062115     ss = (int(s[i:j]) for i in range(len(s)) for j in range(i+1, len(s)+1))
%o A062115     return not any(isprime(k) for k in ss)
%o A062115 print([k for k in range(500) if ok(k)]) # _Michael S. Branicky_, May 02 2023
%o A062115 (Python) # faster for initial segment of sequence; uses ok, import above
%o A062115 from itertools import chain, count, islice, product
%o A062115 def agen(): # generator of terms
%o A062115     yield from chain((0,), (int(t) for t in (f+"".join(r) for d in count(1) for f in "14689" for r in product("014689", repeat=d-1)) if ok(t)))
%o A062115 print(list(islice(agen(), 100))) # _Michael S. Branicky_, May 02 2023
%Y A062115 Subsequence of A084984. [_Arkadiusz Wesolowski_, Jul 05 2011]
%Y A062115 Cf. A071062.
%Y A062115 Cf. A163753 (complement).
%K A062115 base,easy,nonn
%O A062115 1,3
%A A062115 _Erich Friedman_, Jun 28 2001
%E A062115 Offset corrected by _Arkadiusz Wesolowski_, Jul 27 2011