OFFSET
3,23
COMMENTS
The sequence appears to consist of blocks of terms of the form 1, 2, 3, ..., A(k) - 1, A(k), A(k) - 1, ..., 3, 2, 1, where A(k) = A000930(k), separated by blocks of consecutive zeros.
FORMULA
a(n+1) - a(n) belongs to {1, 0, -1}.
EXAMPLE
Sequence arranged as an irregular triangle; after the first row of zeros the row lengths are conjecturally equal to A164316(k) for k >= 2.
0, 0, 0, 0, 0;
1, 0, 0, 0;
1, 0, 0, 0, 0;
1, 0, 0, 0, 0, 0, 0;
1, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0;
1, 2, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 2, 3, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0;
...
MAPLE
# b(n) = A356989
b := proc(n) option remember; if n = 1 then 1 else n - b(b(b(n - b(b(b(b(n-1))))))) end if; end proc:
seq(b(n) - b(b(n)) - b(n - b(n)), n = 3..300);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Peter Bala, Sep 10 2022
STATUS
approved