Search NKS | Online
371 - 380 of 681 for Novo Curso De Direito Civil - Vol. 1 - Parte Geral - 26ª EdGagliano, Pablo StolzeSaraiva Jur
A somewhat better approximation is LogIntegral[n] , equal to Integrate[1/Log[t], {t, 2, n}] . … It is known that the ratio of the number of primes of the form 4k + 1 and 4k + 3 asymptotically approaches 1, but almost nothing has been proved about the fluctuations.
The gap between successive primes Prime[n] - Prime[n - 1] is thought to grow on average at most like Log[Prime[n]] 2 .
In base 2, as used in practical computers, there are just two possible digits: 0 and 1. And in this base, successive digits starting from the right have coefficients 1 , 2 , 4 = 2×2 , 8 = 2×2×2 , etc.
At step t there are Fibonacci[t+1] states; a given state with m white cells and n black cells appears at step 2m+n-1 .
The top right picture shows a solution to an equation obtained from the wave equation by transforming the time variable according to t->1-1/t .
Nevertheless, if one looks at the maximum number of steps needed for any given length of input one finds that this still always increases exactly linearly—just as for the Turing machines that add 1 shown at the top of this page.
… The three schemes for adding 1 to a number that are used by Turing machines with 2 states and 2 colors.
For a rule with number n the two operations correspond respectively to computing 1 - Reverse[list] and list 〚 {1, 5, 3, 7, 2, 6, 4, 8} 〛 with list = IntegerDigits[n, 2, 8] .
A reversible [ 3n+1 problem] system
In both the ordinary 3n+1 problem and in the systems discussed in the main text different numbers often evolve to the same value so that there is no unique way to reverse the evolution. … But apart from these cycles, the numbers produced always seem to grow without bound at an average rate of 3/(2 √ 2 ) in the forward direction, and 2 4 1/3 /3 in the backward direction (at least all numbers up to 10,000 grow to above 10 100 ).
Computing powers [of numbers]
The method of repeated squaring (also known as the binary power method, Russian peasant method and Pingala's method) computes the quantity m t by performing about Log[t] multiplications and building up the sequence
FoldList[#1 2 m #2 &, 1, IntegerDigits[t, 2]]
(related to the Horner form for the base 2 representation of t ). Given two numbers x and y their product can be computed in base k by ( FromDigits does the carries)
FromDigits[ListConvolve[IntegerDigits[x, k], IntegerDigits[y, k], {1, -1}, 0], k]
For numbers with n digits direct evaluation of the convolution would take about n 2 steps. … However, the straightforward method for converting a t -digit number x to base k takes about t divisions, though this can be reduced to around Log[t] by using a recursive method such as
FixedPoint[Flatten[Map[If[# < k, #, With[ {e = Ceiling[Log[k, #]/2]}, {Quotient[#, k e ], With[ {s = Mod[#, k e ]}, If[s 0, Table[0, {e}], {Table[0, {e - Floor[Log[k, s]] - 1}], s}]]}]] &, #]] &, {x}]
The pictures below show stages in the computation of 3 20 (a) by a power tree in base 2 and (b) by conversion from base 3.
There are Ceiling[a/2] + Ceiling[2 a/3] - (a + 1) solutions, the one with smallest x being {Mod[2 a + 2, 3] + 1, 2 Floor[(2a + 2)/3] - (a + 2)} . …
• x 2 a y 3 + 1 . … (An equation of degree d generically defines a surface of genus 1/2(d - 1)(d - 2) .)
Searching [for doubling rules]
No symmetric k = 3 , r = 1 rule yields doubling. … The total number of k = 3 , r = 1 rules that need to be searched can easily be reduced from 3 27 to 3 21 .