login
A330896
Lexicographically earliest sequence of positive integers such that for any m > 0, gaps between consecutive m's are all distinct.
8
1, 1, 2, 1, 2, 2, 1, 3, 2, 3, 1, 4, 2, 3, 3, 1, 4, 2, 4, 3, 5, 1, 3, 2, 4, 4, 5, 5, 1, 3, 2, 5, 4, 5, 6, 3, 1, 6, 2, 6, 4, 5, 7, 3, 4, 1, 5, 2, 6, 5, 7, 7, 3, 4, 6, 1, 4, 2, 5, 6, 6, 7, 3, 7, 6, 5, 1, 4, 2, 7, 8, 6, 7, 3, 8, 5, 7, 4, 1, 6, 2, 7, 8, 8, 9, 3, 5
OFFSET
1,3
COMMENTS
Every positive integer appears infinitely many times in the sequence.
This sequence has similarities with A003602, where gaps between consecutive equal values are all distinct.
This sequence has similarities with A002260, where for any m > 0, gaps between consecutive m's are strictly increasing.
Apparently, for any m > 0:
- the k-th gap between consecutive m's equals k except for finitely many k's,
- the k-th occurrence of m appears at index A330897(m) + A000217(k-1) except for finitely many k's.
LINKS
FORMULA
a(n) = 1 iff n belongs to A000124.
EXAMPLE
The first terms, alongside the gaps for m = 1..4, are:
n| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 ...
a(n)| 1 1 2 1 2 2 1 3 2 3 1 4 2 3 3 1 4 2 4 3 5 1 3 ...
----+---------------------------------------------------------------------
1's| 1, 2, 3, 4, 5, 6, ...
2's| 2, 1, 3, 4, 5, ...
3's| 2, 4, 1, 5, 3, ...
4's| 5, 2, ...
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, May 01 2020
STATUS
approved