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.

A214755 Primes formed by concatenating odd primes.

Original entry on oeis.org

37, 53, 73, 113, 137, 173, 193, 197, 233, 293, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397, 433, 523, 541, 547, 557, 571, 577, 593, 613, 617, 673, 677, 719, 733, 743, 757, 761, 773, 797, 977, 1013, 1033, 1093, 1097, 1117, 1123, 1129, 1153
Offset: 1

Views

Author

Alex Ratushnyak, Aug 03 2012

Keywords

Comments

Subsequence of A019549.

Crossrefs

Programs

  • Python
    from sympy import primerange
    oddPrimes = list(primerange(3, 1154))
    def tryPartitioning(binString):  # First digit is not 0
        l = len(binString)
        for t in range(1, l):
            substr1 = binString[:t]
            if (int(substr1) in oddPrimes) or (t>=2 and tryPartitioning(substr1)):
                substr2 = binString[t:]
                if substr2[0]!='0':
                    if (int(substr2) in oddPrimes) or (l-t>=2 and tryPartitioning(substr2)):
                        return 1
        return 0
    for p in oddPrimes:
        if tryPartitioning(str(p)):
            print(p, end=', ')