The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A362060 Numbers k such that the digits of k are a subsequence of the digits of prime(k). 2
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
a(1) = 7 is a term because the digits of 7 form a subsequence of those of prime(7) = 17.
PROG
(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
CROSSREFS
Sequence in context: A145451 A144676 A243232 * A265963 A191957 A125537
KEYWORD
nonn,base
AUTHOR
Jean-Marc Rebert, Apr 06 2023
EXTENSIONS
a(36)-a(39) from Michael S. Branicky, Apr 06 2023
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 24 01:38 EDT 2024. Contains 372768 sequences. (Running on oeis4.)