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.

Showing 1-6 of 6 results.

A166505 Numbers in A166504 which are not in A152242.

Original entry on oeis.org

202, 203, 205, 207, 302, 303, 305, 502, 505, 507, 702, 703, 705, 707, 1102, 1105, 1107, 1302, 1305, 1702, 1703, 1705, 1707, 1902, 1903, 1905, 2002, 2005, 2007, 2013, 2019, 2022, 2023, 2025, 2031, 2032, 2033, 2035, 2037, 2041, 2043, 2047, 2052, 2055, 2057
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2009

Keywords

Comments

All terms have at least one zero digit and are composite.

Crossrefs

Cf. A152242, A166506 (indices of these terms in A166504).

Programs

Formula

a(n) = A166504(A166506(n))

Extensions

Edited by Charles R Greathouse IV, Apr 23 2010

A167459 Composite numbers in A166504, i.e., whose decimal expansion can be split up into prime numbers, with leading zeros allowed.

Original entry on oeis.org

22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 112, 115, 117, 132, 133, 135, 172, 175, 177, 192, 195, 202, 203, 205, 207, 213, 217, 219, 222, 225, 231, 232, 235, 237, 243, 247, 252, 253, 255, 259, 261, 267, 272, 273, 275, 279, 289, 292, 295, 297, 302, 303
Offset: 1

Views

Author

M. F. Hasler, Nov 19 2009

Keywords

Comments

In contrast to A066737 (which is a subsequence of this one), we allow for leading zeros in the "prime" substrings; the two sequences differ from n=24 on, with a(24)=202 which is not in A066737.
Sequence A166505 gives the difference, A167459 \ A066737 = A166504 \ A152242. Sequence A167458 gives the indices of the terms not in A066737.

Crossrefs

Programs

Formula

A167459 = A002808 n A166504, where "n" means intersection.

A166506 Indices of terms in A166504 which are not in A152242.

Original entry on oeis.org

70, 71, 72, 73, 115, 116, 117, 183, 185, 186, 250, 251, 252, 253, 365, 367, 368, 427, 429, 534, 535, 536, 537, 594, 595, 596, 640, 642, 643, 645, 647, 648, 649, 650, 653, 654, 655, 656, 657, 659, 660, 661, 662, 664, 665, 666, 667, 669, 671, 672, 673, 674
Offset: 1

Views

Author

M. F. Hasler, Nov 02 2009

Keywords

Examples

			a(1)=70 since the first term in A166504 which is not in A152242 is A166504(70)=202.
		

Crossrefs

Programs

  • PARI
    c=0; for(i=1,1e4, is_A166504(i) & c++ & !is_A152242(i) & print1(c", "))

Formula

A166504(a(n)) = A166505(n).

A085823 Numbers in which all substrings are primes.

Original entry on oeis.org

2, 3, 5, 7, 23, 37, 53, 73, 373
Offset: 1

Views

Author

Zak Seidov, Jul 04 2003

Keywords

Comments

The definition implies that the number itself must be prime.
Apparently there are no such primes > 373.
From Jean-Marc Falcoz, Jan 11 2009: (Start)
This is correct.
There can't be any more terms, because they must necessarily be of the form
23737373733737... but the substring 237 is composite
or 273737373... but 273 is composite
or 5373737373... but 537 is composite
or 5737373737... but 573 is composite
or 37373737373... but 3737 is composite
or 7373737373... but 737 is composite
No other form is possible, otherwise, if the digit 2 or 5 is anywhere inside or at the end of the number, one substring-number is even or divisible by 5, and furthermore, there can't be twin digits, because one substring-number would then be divisible by 11.
Obviously, the digits 0, 1, 4, 6, 8, 9 can't appear anywhere in a term of the sequence. (End)
Subsequence of A024770 (right-truncatable primes), A068669 (noncomposite numbers in which all substrings are noncomposite). Supersequence of A202263 (primes in which all substrings and reversal substrings are primes). - Jaroslav Krizek, Jan 28 2012.
From Hieronymus Fischer, Apr 20 2012: (Start)
A more general definition is "Numbers such that all substrings of length <= 3 are primes". Proof: For numbers < 1000 this is plainly true. Suppose that there are such n >= 1000. We recognize that n must contain the string 373, as this is the only valid prime substring with the length 3. It follows, that there are substrings x37 or 73x, with any digit x. Evidently, neither x37 nor 73x are valid prime substrings, independent from the digit x. Thus, there is no number >= 1000 such that all substrings of length <= 3 are primes.
Also, numbers such that all substrings of length <= 2 are primes and the number of prime substrings of length = 3 is greater than m-3 for n <= 37373 and is greater than min(m-4,floor((m-1)/2) else; where m=floor(log_10(a(n)))+1 = number of digits. (End)

Examples

			Example : 373 is in the sequence, because 3, 7, 37, 73 and 373 are prime, but 733 is not in the sequence, because 33 is not prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range[10^3], AllTrue[FromDigits /@ Rest@ Subsequences@ IntegerDigits@ #, PrimeQ] &] (* Michael De Vlieger, Jul 30 2018 *)

Extensions

Thanks to Mark Underwood for pointing out misprints in the first version of this sequence.
Edited by N. J. A. Sloane, Jun 20 2009 at the suggestion of Lekraj Beedassy

A152242 Integers formed by concatenating primes.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 22, 23, 25, 27, 29, 31, 32, 33, 35, 37, 41, 43, 47, 52, 53, 55, 57, 59, 61, 67, 71, 72, 73, 75, 77, 79, 83, 89, 97, 101, 103, 107, 109, 112, 113, 115, 117, 127, 131, 132, 133, 135, 137, 139, 149, 151, 157, 163, 167, 172, 173, 175, 177, 179
Offset: 1

Views

Author

Eric Angelini, Oct 15 2009

Keywords

Comments

Leading zeros are not allowed (cf. A166504).
For any k > 0, there are A246806(k) terms with k digits. - Rémy Sigrist, Jan 08 2023

Examples

			101 is a member since it is prime; 303 is not since it is composite and 30 is also not a prime.
		

Crossrefs

Programs

  • PARI
    is_A152242(n)=/* If n is even, the last digit must be 2 and [n\10] (if nonzero) must be in this sequence. (This check is not necessary but improves speed.) */ bittest(n,0) || return( n%10==2 && (n<10 || is_A152242(n\10))); isprime(n) && return(1); for(i=1,#Str(n)-1, n%10^i>10^(i-1) && isprime( n%10^i ) && is_A152242( n\10^i) && return(1)) \\ M. F. Hasler, Oct 15 2009; edited Oct 16 2009, to disallow leading zeros
    
  • Python
    from sympy import isprime
    def ok(n):
        if isprime(n): return True
        s = str(n)
        return any(s[i]!="0" and isprime(int(s[:i])) and ok(int(s[i:])) for i in range(1, len(s)))
    print([k for k in range(180) if ok(k)]) # Michael S. Branicky, Sep 01 2024

Extensions

More terms from M. F. Hasler and Zak Seidov, Oct 15 2009

A167458 Indices of numbers in A167459 which are not in A066737.

Original entry on oeis.org

24, 25, 26, 27, 53, 54, 55, 88, 89, 90, 124, 125, 126, 127, 181, 182, 183, 215, 216, 268, 269, 270, 271, 303, 304, 305, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364
Offset: 1

Views

Author

M. F. Hasler, Nov 19 2009

Keywords

Comments

Also, indices of terms in A167459 which are in A166505 (or: which are not in A152242).

Crossrefs

Programs

  • PARI
    c=0; for(n=1,9999, is_A167459(n) & c++ & !is_A152242(n) & print1(c", "))
Showing 1-6 of 6 results.