Search NKS | Online

Trinomial coefficients The coefficient of x n in the expansion of (1 + x + x 2 ) t is Sum[Binomial[n + t - 1 - 3k, n - 3k] Binomial[t, k] (-1) k , {k, 0, t}] which can be evaluated as Binomial[2t, n] Hypergeometric2F1[-n, n - 2t, 1/2 - t, 1/4] or finally GegenbauerC[n, -t, -1/2] . This result follows directly from the generating function formula (1 - 2 x z + x 2 ) -m  Sum[GegenbauerC[n, m, z] x n , {n, 0, ∞ }]
The number of such strings containing 2n characters is the n th Catalan number Binomial[2n, n]/(n + 1) (as obtained from the generating function (1 - Sqrt[1 - 4x])/(2x) ). The number of strings of depth d (and thus taking d steps to annihilate completely) is given by c[{n, n}, d] - c[{n, n}, d - 1] where c[{_, _}, -1] = 0; c[{0, 0}, _] = 1; c[{m_, n_}, _] := 0 /; n > m; c[{m_, n_}, d_] := Sum[c[{i, j}, d], {i, 0, m - 1}, {j, m - d, n - 1}] Several types of structures are equivalent to strings of balanced parentheses, as illustrated below.
For prime k , each cycle (except all 0's) corresponds to a term in the product Factor[x k n - 1 - 1, Modulus  k] .
Many of the pigments used by animals are by-products of metabolism, suggesting that at least at first pigmentation patterns were probably often incidental to the operation of the animal.
Arithmetic coding Consider dividing the interval from 0 to 1 into a succession of bins, with each bin having a width equal to the probability for some sequence of blocks to occur. … For any sequence s this can be done using Module[{c, m = 0}, Map[c[#] = {m, m += Count[s, #]/Length[s]} &, Union[s]]; Function[x, (First[RealDigits[2 # Ceiling[2 -# Min[x]], 2, -#, -1]] &)[Floor[Log[2, Max[x] - Min[x]]]]][ Fold[(Max[#1] - Min[#1]) c[#2] + Min[#1] &, {0, 1}, s]]] Huffman coding of a sequence containing a single 0 block together with n 1 blocks will yield output of length about n ; arithmetic coding will yield length about Log[n] .
For k = 2 , a cell survives for s steps if these digits are all 0 (so that s  IntegerExponent[n, k] ). But for k > 2 , no such simple characterization appears to exist. … The solution is Fold[Mod[#1 + k, #2, 1]&, 0, Range[n]] , or FromDigits[RotateLeft[IntegerDigits[n, 2]], 2] for k = 2 .
If all possible sequences of colors were allowed, then there would be k possibilities for what block could follow a given block, given by Map[Rest, Table[Append[list, i], {i, 0, k - 1}]] . The possible sequences of length n blocks that can occur are conveniently represented by possible paths by so-called de Bruijn networks, of the kind shown for k = 2 and n = 2 through 5 below. … The constraint on page 210 has k = 2 and n = 3 ; the pattern that satisfies it repeats with period 4, thus saturating the bound.
has the property that its vertical position ends with a 0, and its horizontal position ends with a 1. … The procedure works by looking at the base 2 digit sequences of the coordinates. … The nested pattern can be built up by a 2D substitution system with the rules shown.
Then starting with a single black cell at the origin, represented by {{0, 0}} , the cluster can be grown for t steps as follows: AEvolve[t_] := Nest[AStep, {{0, 0}}, t] AStep[c_] := If[!MemberQ[c, #], Append[c, #], AStep[c]]& [f[c] + f[{{1, 0}, {0, 1}, {-1, 0}, {0, -1}}]] f[a_]:=a 〚 Random[Integer, {1, Length[a]}] 〛 This implementation can easily be extended to any type of lattice and any number of dimensions. … With a grid of cells set up in advance, each step in this type of Eden model can be achieved with AStep[a_] := ReplacePart[a, 1, (# 〚 Random[ Integer, {1, Length[#]}] 〛 &)[Position[(1 - a)Sign[ ListConvolve[{{0, 1, 0}, {1, 0, 1}, {0, 1, 0}}, a, {2, 2}]], 1]]] This implementation can readily be extended to generalized aggregation models (see below ).
For rule 90 the combination c can be specified as {{1, 0, 1}} , while for rule 150R it can be specified as {{0, 1, 0}, {1, 1, 1}} . … Starting with a list of the initial conditions for s steps, the configurations for the next s steps are given by Append[Rest[list], Map[Mod[Apply[Plus, Flatten[c #]], 2]&, Transpose[ Table[RotateLeft[list, {0, i}], {i, -r, r}], {3, 2, 1}]]] where r = (Length[First[c]] - 1)/2 . … Solve[z 2  h z + 1] and h = 1/x + 1 + x .
1 ... 16171819 ...