A383318 Lexicographically earliest sequence of distinct terms such that replacing each term k with prime(k) does not change the succession of digits.
6455, 3, 5, 1, 12, 37, 15, 7, 4, 71, 77, 35, 33, 8, 9, 14, 91, 371, 92, 34, 346, 72, 53, 94, 79, 13, 923, 39, 359, 2, 41, 49, 140, 141, 721, 916, 724, 17, 31, 792, 27, 80, 98, 11, 54, 497, 159, 547, 95, 912, 760, 73, 10, 340, 952, 131, 25, 135, 47, 93, 739, 43
Offset: 1
Examples
Let b(n) = prime(a(n)) (a(n)): 6455, 3, 5, 1, 12, 37, 15, 7, 4, 71, 77, ... (b(n)): 64553, 5, 11, 2, 37, 157, 47, 17, 7, ...
Links
- Dominic McCarty, Table of n, a(n) for n = 1..10000
Programs
-
Python
from sympy import prime from itertools import count a, sa, sb = [6455], "6455", "64553" for _ in range(30): a.append(next(n for k in count(1) if not (n := int(sb[len(sa):len(sa)+k])) in a and not (len(sb) > len(sa) + k and sb[len(sa) + k] == "0"))) sa += str(a[-1]); sb += str(prime(a[-1])) print(a)