OFFSET
1,5
COMMENTS
The sequence is well defined as we can always extend the sequence with a number that has not yet appeared.
The number 1 appears infinitely many times in the sequence:
- by contradiction: suppose that m is the index of the last occurrence of 1 in the sequence,
- there is no n > 0 such that n + k = m and n + 2*k = 2*m (with k > 0),
- so we can choose a(2*m) = 1, QED.
This sequence has connections with A003602:
- here we have up to a(n) numbers k such that a(n+k) = a(n+2*k), there we have no such numbers,
- for any v >= 0, let f_v be the lexicographically earliest sequence of positive integers such that there are no more than v numbers k such that f_v(n + k) = f_v(n + 2*k),
- then f_v corresponds to A003602 where all but the first term have been repeated 2*v+1 times.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 1..10000
Rémy Sigrist, PARI program for A309797
Rémy Sigrist, Scatterplot of the first 500000 terms
FORMULA
a(n) >= #{ k>0 such that a(n+k) = a(n+2*k) }.
EXAMPLE
The first terms, alongside the corresponding k's, are:
n a(n) k's
-- ---- ----------
1 1 {1}
2 1 {1}
3 1 {2}
4 1 {1}
5 2 {1, 3}
6 2 {2, 14}
7 2 {1, 2}
8 1 {1}
9 1 {1}
10 1 {4}
11 1 {1}
12 3 {2, 3, 68}
13 3 {1, 4, 22}
14 2 {1, 2}
PROG
(PARI) See Links section.
CROSSREFS
KEYWORD
nonn,look
AUTHOR
Rémy Sigrist, Nov 11 2019
STATUS
approved