OFFSET
1,1
COMMENTS
Suppose that you have two known sequences of finite length on a limited alphabet: a[n], b[n] Such that a[n]<>b[n] ( doesn't equal) and you have two binary sequences bn1[n] and bn2[n] such that you can construct: c[n]=bn1[n]*a[n]+bn2[n]*b[n] Then there are four possibilities for the sums: c[n]=0 c[n]=a[n] c[n]=b[n] c[n]=a[n]+b[n] Since a[n]<>b[n], these are distinguishable, so that using these two sequences a simple code of two binary sequences can be coded on a single sequence with a limited alphabet. My 12 tone sequences would limit the total alphabet to 24 characters. By skipping any case where a[n]=b[n], the use of any general set of {a,b} sequences is possible. It doesn't matter if they repeat in one sequence of the other, just that they aren't the same. The information is in the binary sequence and this can be taken as a coding of any number of bits in pairs. It can work on lower substitutions as well, but maybe not as well since it is more likely in a level 3 substitution that a[n]=b[n] than in a 12th level substitution. Something like a Fibonacci sequence would involve too large of numbers, so substitutions are more natural. In this sequence I haven't worried about a(n)=b(n) and just constructed a general sequence of this type.
FORMULA
MATHEMATICA
Clear[a, Conway, Mallows] (* sequence A004001*) Conway[1] = Conway[2] = 1; Conway[n_Integer?Positive] := Conway[n] = Conway[Conway[n - 1]] + Conway[n - Conway[n - 1]] (* sequence A005229*) Mallows[n_Integer?Positive] := Mallows[n] = Mallows[Mallows[n - 2]] + Mallows[n - Mallows[n - 2]] Mallows[0] = Mallows[1] = Mallows[2] = 1; (* minor A133270*) Clear[s, p] s[i_] = {i, If[i + 3 > 12, i - 7, i + 3], If[i + 7 > 12, i - 5, i + 7], If[i + 10 > 12, i - 2, i + 10]}; t[a_] := Flatten[s /@ a]; p[0] = {1}; p[1] = t[p[0]]; p[n_] := t[p[n - 1]]; P1 = p[4]; (*Major A133269*) Clear[s, p] s[i_] = {i, If[i + 4 > 12, i - 8, i + 4], If[i + 7 > 12, i - 5, i + 7], If[i + 11 > 12, i - 1, i + 11]}; t[a_] := Flatten[s /@ a]; p[0] = {1}; p[1] = t[p[0]]; p[n_] := t[p[n - 1]]; P2 = p[4]; aout = Table[Mod[Conway[n], 2]*P1[[n]] + Mod[Mallows[n], 2]*P2[[n]], { n, 1, Min[Length[P1], Length[P2]]}]
CROSSREFS
KEYWORD
nonn,uned
AUTHOR
Roger L. Bagula, Jan 02 2008
STATUS
approved