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.

A213320 Numbers such that the number of nonprime substrings equals the number of digits (substrings with leading zeros are considered to be nonprime).

Original entry on oeis.org

1, 4, 6, 8, 9, 11, 12, 15, 19, 20, 21, 24, 26, 28, 30, 34, 36, 38, 39, 41, 42, 45, 50, 51, 54, 56, 58, 61, 62, 63, 65, 70, 74, 76, 78, 82, 85, 87, 89, 92, 93, 95, 117, 123, 127, 132, 133, 135, 139, 153, 157, 167, 171, 172, 175
Offset: 1

Views

Author

Hieronymus Fischer, Aug 26 2012

Keywords

Comments

Also numbers such that the number of prime substrings is A000217(m-1) = m(m-1)/2, where m is the number of digits.
The sequence is finite. Proof: Let p be a number >= 10^17 and let m = 9k+j be the number of digits of p, where k = floor(m/9) >= 2 and j = m mod 9. Since each 9-digit number has at least 15 nonprime substrings, it follows that p has at least 15k = 9k + 6k > 9k + j = m nonprime substrings (since 6k >= 12> j for k >= 2). Consequently, no number >= 10^17 can be a term of the sequence.
The last term is a(858)=3733739. Proof: Each 9-digit number has at least 15 nonprime substrings, thus, the numbers 10^8 <= p < 10^14 also have at least 15 nonprime substrings and therefore cannot be terms of the sequence. Same is true for numbers 10^14 <= p < 10^17 since each 6-digit number has at least 4 nonprime substrings, and thus each number with >= 15 digits has at least 15+4 = 19 nonprime substrings. Since each 8-digit number has at least 10 nonprime substrings, it follows that the last term of the sequence must be less than 10^7. By direct search we find a(858) = 3733739.

Examples

			a(1) = 1, since 1 has 1 nonprime substrings.
a(43) = 117, since 117 has 3 digits and also 3 nonprime substrings (1, 1, 117).
		

Crossrefs

Extensions

Typo in example corrected, Hieronymus Fischer, Sep 11 2012