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 powers of two appear in natural order.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..6223
Rémy Sigrist, Logarithmic scatterplot of the first 10319 terms (where red pixels correspond to powers of 2)
Rémy Sigrist, PARI program
EXAMPLE
The first terms and runs are:
n a(n) n-th run
- ---- -----------------------------------
1 1 1
2 2 2, 4
3 4 3, 8, 16, 32
4 3 5, 10, 48
5 8 6, 9, 64, 128, 256, 512, 1024, 2048
PROG
(PARI) \\ See Links section.
CROSSREFS
KEYWORD
nonn,tabf,base
AUTHOR
Rémy Sigrist, Aug 09 2025
STATUS
approved
