A385512 a(n) is the least prime p > n in which the digits of n appear as an ordered but not necessarily contiguous subsequence.
101, 11, 23, 13, 41, 53, 61, 17, 83, 19, 101, 101, 127, 103, 149, 151, 163, 107, 181, 109, 1201, 211, 223, 223, 241, 251, 263, 127, 281, 229, 307, 131, 1321, 233, 347, 353, 367, 137, 383, 139, 401, 241, 421, 431, 443, 457, 461, 347, 487, 149, 503, 151, 521, 353, 541
Offset: 0
Examples
a(11) = 101, because 101 is the least prime p > 11 in which the digits of 11 appear as an ordered but non-necessarily contiguous subsequence.
Links
- Michael S. Branicky, Table of n, a(n) for n = 0..10000
Programs
-
Python
from sympy import sieve def osub(n, t): # n > 0 is an ordered_subsequence of t if t < n: return False while n and t: if n%10 == t%10: n //= 10 t //= 10 return n == 0 def a(n): return next(p for p in sieve if p > n and osub(n, p)) if n else 101 print([a(n) for n in range(55)]) # Michael S. Branicky, Jul 01 2025