OFFSET
1,2
COMMENTS
This sequence is a permutation of the positive integers as each run starts with the least integer not yet in the sequence.
The prime numbers appear in natural order.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program
FORMULA
T(n, 1) = 2*n-2 for any n > 1.
EXAMPLE
The first terms and runs are:
n a(n) n-th run
-- ---- -----------------------------------------------------------
0 1 1
1 2 2, 3
3 3 4, 5, 7
6 4 6, 11, 13, 17
10 5 8, 9, 19, 23, 25
15 7 10, 21, 29, 31, 37, 41, 43
22 6 12, 35, 47, 53, 59, 61
28 11 14, 15, 67, 71, 73, 79, 83, 89, 97, 101, 103
39 13 16, 27, 49, 55, 107, 109, 113, 127, 131, 137, 139, 149, 151
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
nonn,tabf
AUTHOR
Rémy Sigrist, Aug 09 2025
STATUS
approved
