|
|
A368282
|
|
Table T(n,k) with n>=1 and k>=0, read by downwards antidiagonals where the n-th row is the sequence given by a(0) = 0 and a(k) = k - a(floor(a(k-1)/n)).
|
|
2
|
|
|
0, 1, 0, 1, 1, 0, 2, 2, 1, 0, 3, 2, 2, 1, 0, 3, 3, 3, 2, 1, 0, 4, 4, 3, 3, 2, 1, 0, 4, 4, 4, 4, 3, 2, 1, 0, 5, 5, 5, 4, 4, 3, 2, 1, 0, 6, 6, 6, 5, 5, 4, 3, 2, 1, 0, 6, 7, 6, 6, 5, 5, 4, 3, 2, 1, 0, 7, 8, 7, 7, 6, 6, 5, 4, 3, 2, 1, 0, 8, 8, 8, 8, 7, 6, 6, 5, 4
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,7
|
|
LINKS
|
|
|
FORMULA
|
Conjecture: if a(k) is the fixed point of the morphism 0->R(n), 1->R(n)0, then the partial sum of a(k) is the Hofstadter-like sequence b(k): b(0)=0, b(k) = k - b(floor(b(k-1)/n)), i.e., the partial sum of the n-th row of A368281 is the n-th row of A368282. The cases n=1 and n=2 are known to be true (see A005206, A286389).
|
|
EXAMPLE
|
Table begins:
k
n=1: 0, 1, 1, 2, 3, 3, 4, 4, 5, 6, 6, 7, 8, 8, 9, 9, 10, 11, 11, 12, ...
n=2: 0, 1, 2, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 10, 11, 12, 13, 14, 14, ...
n=3: 0, 1, 2, 3, 3, 4, 5, 6, 6, 7, 8, 9, 9, 10, 11, 12, 13, 14, 15, 15, ...
n=4: 0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, ...
n=5: 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 10, 10, 11, 12, 13, 14, 15, 15, 16, ...
n=6: 0, 1, 2, 3, 4, 5, 6, 6, 7, 8, 9, 10, 11, 12, 12, 13, 14, 15, 16, 17, ...
n=7: 0, 1, 2, 3, 4, 5, 6, 7, 7, 8, 9, 10, 11, 12, 13, 14, 14, 15, 16, 17, ...
|
|
MATHEMATICA
|
a[n_, k_] := a[n, k] = Module[{r}, If[k == 0, Return[0]]; r = k - a[n, Quotient[a[n, k - 1], n]]; r];
Flatten[Table[a[n - k + 1, k - 1], {n, 0, 13}, {k, n, 1, -1}]] (* Robert P. P. McKone, Dec 20 2023 *)
|
|
PROG
|
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
if k == 0: return 0
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|