OFFSET
1,2
COMMENTS
This sequence has similarities with A100795.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
EXAMPLE
For k = 1:
- we can set a(1) = 1,
For k = 2:
- we can set a(2) = a(4) = 2,
For k = 3:
- we can set a(3) = a(6) = a(9) = 3.
For k = 4:
- we can set a(5) = 4,
- however a(9) is already set to 3,
- so we continue with a(13) = a(17) = a(21) = 4.
PROG
(PARI) { v=1; for (n=1, #a=vector(75), if (!a[n], r=v; forstep (m=n, #a, v, if (!a[m], a[m]=v; if (!r--, break))); v++; ); print1 (a[n]", ")) }
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Jul 12 2020
STATUS
approved