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-2 of 2 results.

A141409 Prime numbers that cannot be formed by the concatenation of previous terms.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 47, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 127, 131, 139, 149, 151, 157, 163, 167, 179, 181, 191, 199, 223, 227, 233, 239, 251, 263, 269, 277, 281, 307, 337, 349, 353, 373, 401, 409, 419, 421, 431, 439, 443, 449, 457, 461
Offset: 1

Views

Author

Paolo P. Lava and Giorgio Balzarotti, Aug 04 2008, Aug 28 2008, Mar 04 2010

Keywords

Comments

Previous terms can appear in any order but can be used at most once. - Paolo P. Lava, Mar 04 2010

Examples

			137 is not in the sequence because 13 || 7 -> 137;
797 is not in the sequence because 7 || 97 or 79 || 7 -> 797.
257 is not in the sequence because 2 || 5 || 7 = 257 where || denotes concatenation. - _David A. Corneth_, Jan 23 2022
		

Crossrefs

Cf. A141033.

Programs

Extensions

Offset changed to 1 and data corrected by David A. Corneth, Jan 23 2022

A348358 Primes which are not the concatenation of smaller primes (in base 10 and allowing leading 0's).

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 29, 31, 41, 43, 47, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 127, 131, 139, 149, 151, 157, 163, 167, 179, 181, 191, 199, 239, 251, 263, 269, 281, 349, 401, 409, 419, 421, 431, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499
Offset: 1

Views

Author

M. Farrokhi D. G., Oct 14 2021

Keywords

Comments

This is the sequence of numbers that are neither a product of smaller primes nor a concatenation of smaller primes (in base 10).
This sequence differs from A238647. The prime 227 is in A238647 but not in this sequence for it is the concatenation of primes 2, 2, 7 (in base 10).
Conjecture. If p > 7 is a prime, then there exists a base b such that p in base b is the concatenation of smaller primes in base b.

Examples

			The prime 127 is in the sequence because the only expressions of 127 as concatenation of smaller numbers are 1 U 2 U 7, 1 U 27, and 12 U 7 (in base 10) but 1 and 12 are not primes.
The prime 271 is not in the sequence because it is the concatenation of primes 2 and 71 (in base 10).
The prime 307 is not in the sequence because it is the concatenation of primes 3 and 07 (in base 10).
		

Crossrefs

Programs

  • Mathematica
    Select[Prime@Range@100,Union[And@@@PrimeQ[FromDigits/@#&/@Union@Select[Flatten[Permutations/@Subsets[Most@Rest@Subsequences[d=IntegerDigits@#]],1],Flatten@#==d&]]]=={False}||Length@d==1&] (* Giorgos Kalogeropoulos, Oct 15 2021 *)
  • Python
    from sympy import isprime, primerange
    def cond(n): # n is not a concatenation of smaller primes
        if n%10 in {4, 6, 8}: return True
        d = str(n)
        for i in range(1, len(d)):
            if isprime(int(d[:i])):
                 if isprime(int(d[i:])) or not cond(int(d[i:])):
                     return False
        return True
    def aupto(lim): return [p for p in primerange(2, lim+1) if cond(p)]
    print(aupto(490)) # Michael S. Branicky, Oct 15 2021
Showing 1-2 of 2 results.