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.

A383318 Lexicographically earliest sequence of distinct terms such that replacing each term k with prime(k) does not change the succession of digits.

Original entry on oeis.org

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

Views

Author

Dominic McCarty, Apr 23 2025

Keywords

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, ...
		

Crossrefs

Cf. A383319 (prime(a(n))), A067928, A383320, A383322, A302656.

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)