Search NKS | Online

1 - 10 of 77 for Sum
The example at the top is Pascal's triangle, formed by making each number be the sum of the numbers immediately to its left and right on the row above. The example at the bottom is a generalization of Pascal's triangle in which each number is the sum of the numbers above it and to its left and right on the row above.
The pictures below show Sum[Sin[n x]/n, {n, k}] for various numbers of terms k . … Note that for x of the form p π /q , the k = ∞ sum is just ( π /q/(2q)) 2 Sum[Sin[n 2 p π /q]/Sin[n π /(2q)] 2 , {n, q - 1}] The pictures below show Sum[Cos[2 n x], {n, k}] (as studied by Karl Weierstrass in 1872). … The curves below are approximations to Sum[Cos[2 n x]/2 a n , {n, ∞ }] .
(b) (Aliquot sums) The quantity that is plotted is DivisorSigma[1, n] - 2n , equal to Apply[Plus, Divisors[n]] - 2n . … The number of ways of expressing an integer n as the sum of two such squares is 4 Apply[Plus, Im[  ^Divisors[n]]] . … Edward Waring stated in 1770 that any number can be expressed as a sum of at most 9 cubes and 19 fourth powers.
As an example, the n th digit of Log[2] in base 2 is formally given by Round[FractionalPart[2 n Sum[2 -k /k, {k, ∞ }]]] . And in practice the n th digit can be found just by computing slightly over n terms of the sum, according to Round[FractionalPart[ Sum[FractionalPart[PowerMod[2, n - k, k]/k], {k, n}] + Sum[2 n - k /k, {k, n + 1, n + d}]]] where several values of d can be tried to check that the result does not change. … The same basic approach as for Log[2] can be used to obtain base 16 digits in π from the following formula for π : Sum[16 -k (4/(8k + 1) - 2/(8k + 4) - 1/(8k + 5)-1/(8k + 6)), {k, 0, ∞ }] A similar approach can also be used for many other constants that can be viewed as related to values of PolyLog .
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, ∞ }]
Collisions [in rule 110] A fundamental result is that the sum of the widths of all persistent structures involved in an interaction must be conserved modulo 14.
Generating functions [for nested patterns] A convenient algebraic way to describe a sequence of numbers a[n] is to give a generating function Sum[a[n] x n , {n, 0, ∞ }] . 1/(1 - x) thus corresponds to the constant sequence and 1/(1 - x - x 2 ) to the Fibonacci sequence (see page 890 ). A 2D array can be described by Sum[a[t, n] x n y t , {n, - ∞ , ∞ }, {t, - ∞ , ∞ }] .
Egyptian fractions Following the ancient Egyptian number system, rational numbers can be represented by sums of reciprocals, as in 3/7  1/3 + 1/11 + 1/231 . With suitable distinct integers a[n] one can represent any number by Sum[1/a[n], {n, ∞ }] .
Evolution of simple two-dimensional cellular automata in which the color of each cell at each step is determined by looking at a weighted sum of the average colors of cells up to distance 3 away. … A cell becomes black if the weighted sum is positive, and white otherwise.
The pictures above show representations of the mappings corresponding to various rules, obtained by plotting Sum[a[t + 1, i] 2 -i , {i, -n, n}] against Sum[a[t, i] 2 -i , {i, -n, n}] for all possible choices of the a[t, i] .
1 ...