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.

A268031 Primes with the property that deleting some two digits one at a time in unique order gives a prime (with an even number of digits) at each step, until the empty string is reached.

Original entry on oeis.org

11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 1009, 1021, 1049, 1051, 1063, 1069, 1087, 1201, 1409, 1609, 1663, 1669, 1801, 2003, 2011, 2017, 2063, 2069, 2267, 2609, 2621, 2657, 2663, 2687, 2767, 2861, 3001, 3023
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 24 2016

Keywords

Examples

			The prime 2657 is in the sequence because the set {57, 67, 65, 27, 25, 26} contains only one two-digit prime.
The prime 1021 is in the sequence because the set {21, 1, 2, 11, 12, 10} contains only one prime with an even number of digits.
The prime 1579 is not in the sequence because the set {79, 59, 57, 19, 17, 15} contains four two-digit primes.
The number 2087 is not in the sequence because the set {87, 7, 8, 27, 28, 20} does not contain any prime with an even number of digits.
		

Crossrefs

Programs

  • Magma
    /* generates first 211 terms */; lst:=[m: m in [11..99 by 2] | IsPrime(m)]; for m in [1001..9999 by 2] do if IsPrime(m) then S:=[]; Temp:=Intseq(m); for a in [2..4] do for b in [1..a-1] do d:=Seqint([Temp[b], Temp[a]]); if IsPrime(d) and d gt 10 then Append(~S, d); end if; end for; end for; if #S eq 1 then Append(~lst, m); end if; end if; end for; lst; // Arkadiusz Wesolowski, Dec 17 2020

A350443 Rigidly-deletable primes: primes such that removing some digit, one at a time in unique order gives a prime at each step, until the empty string is reached.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 29, 31, 43, 47, 59, 67, 71, 79, 83, 97, 127, 157, 163, 269, 271, 359, 383, 439, 457, 463, 487, 509, 547, 569, 571, 643, 659, 683, 701, 709, 751, 769, 863, 929, 983, 1217, 1427, 1487, 2069, 2371, 2609, 2671, 2689, 2713, 2731, 2791, 2969, 3259
Offset: 1

Views

Author

Arkadiusz Wesolowski, Dec 31 2021

Keywords

Comments

Rigidly-deletable primes are deletable primes where the choice of digit to delete is unique (all other choices give nonprime numbers).
Leading zeros are allowed in the number that appears after the digit is deleted.

Examples

			The prime 103 is not a member since removing a digit will either give 03 which has a leading zero (3 is a prime number), or give one of the numbers 13 which is prime, or 10 which is composite.
The prime 509 is a member since removing a digit will either give 09 which has a leading zero (9 is a composite number), or give one of the numbers 59 which is prime, or 50 which is composite. Then removing a digit from 59 will either give 9, or 5 which is prime.
		

Crossrefs

Programs

  • PARI
    for(k=2, 3259, if(isprime(k), a=k; r=#digits(a); q=r; for(y=1, r, L=List([]); for(d=1, q, T=List(Vec(Str(a))); listpop(T, d); listput(L, concat(T))); t=0; for(b=1, q, w=L[b]; if(isprime(eval(w)), t++; u=w); if(t==2, break)); if(t==1, q=#Vec(u); a=u, break); if(y==r, print1(k, ", ")))));
    
  • Python
    from sympy import isprime
    def ok(n):
        if not isprime(n): return False
        if n < 10: return True
        s, c, d = str(n), 0, None
        for i in range(len(s)):
            di = int(s[:i]+s[i+1:])
            if isprime(di):
                c += 1
                if c > 1:
                    return False
                d = di
        return d and ok(d) and len(str(d)) == len(s) - 1
    print([k for k in range(3260) if ok(k)]) # Michael S. Branicky, Dec 31 2021
Showing 1-2 of 2 results.