OFFSET
0,4
COMMENTS
A generalization of the Hofstadter G-sequence A005206 since it is part of the following family of sequences (which would give for k=1, p=2 the original G-sequence):
a(n) = n - (a^p)(n-k) where (a^p) denotes p recurrences of a on the given argument (e.g., this sequence would be denoted as n-(a^3)(n-3)) with a(0)=a(1)=...=a(k-1)=0 with k=1,2,3,..., p=1,2,3,... (here k=p=3).
Shares nearly all properties with the a(n) = n - (a(a(n-k)) family (quote from the page of the k=2-Sequence of this family, A163873, which applies to this family as well):
"Some things can be said about this family of sequences: Every a(n) occurs either exactly once or exactly k+1 times (except for the initial values which occur k times). A block of k+1 occurrences of the same number n is interrupted after the first one by the following k-1 terms: n+1, n+2, ..., n+k-1 (e.g., see from [for this sequence: a(15) to a(20): 12,13,14,12,12,12]).
Since every natural number occurs in each sequence of the family at least once and 0 <= a(n) <= n for all n [to be precise: From the (2*k)-th term on] the terms can be ordered in such a way that every n is connected to its a(n) in a tree structure so that:
.a(n)
..|..
..a.."
This will give a (k+1)-ary tree which (Conjecture:) features a certain structure (similar to the G-sequence A005206 or other sequences of the above mentioned family: A163873, A163875 and A163874). If the (below) following two constructs (C and D) are added on top of their ends (either marked with C or D) one will (if starting with one instance of D) receive the above tree (x marks a node, o marks spaces for nodes that are not part of the construct but will be filled by the other construct, constructs apply only to this sequence, comments for the whole family!):
Diagram of D:
......x..........
..../...\\\......
.../.....\\.\....
../.......\.\.\..
.D...o.o...x.x.x.
...........|.|.|.
...........x.x.x.
...........|.|.|.
...........D.C.C.
(o will be filled by C)
Diagram of C:
\\...x.
\\\./..
.\\/...
../\\..
./.\\\.
C...\\\
(This means construct C, on its way from a(n) to n, crosses exactly k other paths, e.g., from 14 to 17.)
The first node of D always has k+1 child nodes where the first one consists of a new copy of D, the second one consists of (p-1) other nodes and then D. The remaining child nodes consist of (p-1) other nodes and then C. Between the first and the second leaf there is always space for k-1 nodes of construct C. Construct C, on its way from a(n) to n, always crosses exactly k paths (the right ones from construct D).
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Daniel Platt (d.platt(AT)web.de), Sep 22 2009
STATUS
approved