

A330896


Lexicographically earliest sequence of positive integers such that for any m > 0, gaps between consecutive m's are all distinct.


2



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
(list;
graph;
refs;
listen;
history;
text;
internal format)



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 kth gap between consecutive m's equals k except for finitely many k's,
 the kth occurrence of m appears at index A330897(m) + A000217(k1) except for finitely many k's.


LINKS

Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program for A330896


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

Cf. A000124, A000217, A002260, A003602, A330897.
Sequence in context: A194083 A109699 A301563 * A328294 A029283 A264404
Adjacent sequences: A330893 A330894 A330895 * A330897 A330898 A330899


KEYWORD

nonn,look


AUTHOR

Rémy Sigrist, May 01 2020


STATUS

approved



