login
A165565
a(n) = n - a(a(a(n-3))) with a(0)=a(1)=a(2)=0.
0
0, 0, 0, 3, 4, 5, 3, 3, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14, 12, 12, 12, 15, 16, 17, 15, 15, 15, 18, 19, 20, 21, 22, 23, 21, 21, 21, 24, 25, 26, 27, 28, 29, 30, 31, 32, 30, 30, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 39, 39, 39, 42, 43, 44, 42, 42, 42, 45, 46, 47, 48, 49, 50, 51, 52
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
Mix from Hofstader H-Sequence A005374 and the Meta-Hofstadter G(-3)-Sequence A163874.
Sequence in context: A228947 A337535 A163874 * A033706 A354597 A121890
KEYWORD
easy,nonn
AUTHOR
Daniel Platt (d.platt(AT)web.de), Sep 22 2009
STATUS
approved