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.

A362060 Numbers k such that the digits of k are a subsequence of the digits of prime(k).

Original entry on oeis.org

7, 1491, 1723, 4437, 5789, 5893, 6151, 6331, 6347, 6455, 6456, 6457, 6459, 6460, 6466, 6469, 6491, 6501, 6513, 6523, 6581, 6663, 6931, 7817, 9551, 12083, 15103, 23071, 24833, 107647, 115259, 303027, 440999, 968819, 5517973, 27737957, 93230839, 95929941, 96567161
Offset: 1

Views

Author

Jean-Marc Rebert, Apr 06 2023

Keywords

Examples

			a(1) = 7 is a term because the digits of 7 form a subsequence of those of prime(7) = 17.
		

Crossrefs

Programs

  • Python
    from sympy import sieve
    def ok(n):
        p = sieve[n]
        while n and p:
            if n%10 == p%10:
                n //= 10
            p //= 10
        return n == 0
    print([k for k in range(1, 10**6) if ok(k)]) # Michael S. Branicky, Apr 06 2023
    
  • Python
    from sympy import prime, nextprime
    from itertools import count, islice
    def A362060_gen(startvalue=1): # generator of terms >= startvalue
        p = prime(max(startvalue,1))
        for k in count(max(startvalue,1)):
            c = iter(str(p))
            if all(map(lambda b:any(map(lambda a:a==b,c)),str(k))):
                yield k
            p = nextprime(p)
    A362060_list = list(islice(A362060_gen(),20)) # Chai Wah Wu, Apr 07 2023

Extensions

a(36)-a(39) from Michael S. Branicky, Apr 06 2023