Tag Info

Hot answers tagged

5

Lucas' correspondence theorem, here or here, states that a binomial coefficient Binomial[n,k] is equivalent to, mod prime p, the product of binomial coefficients Binomial[ni,ki], where ni and ki are the digits in the base p expansion of n and k, respectively. The function BinomialMod[n,k,p] does this calculation for prime modulus p. BinomialMod[n_, k_, p_] ...


4

The function Txk[x,k,n] calculates the contribution of the k^th zero at position x. The parameter n governs how many terms in the sum are used. This corresponds to Havil's equation on the bottom of page 196 of his book Gamma. Note that ExpIntegralEi should be used as @Guesswhoitis suggests, and as discussed here. I think there is a typo in the book, hence ...


4

Using the formula given in the arXiv preprint Patrick linked to for the "carefree constant" gives: Exp[NSum[(-1)^k PrimeZetaP[k] (1 - LucasL[k])/k, {k, 2, ∞}, Compiled -> False, Method -> "AlternatingSigns", NSumTerms -> 20, WorkingPrecision -> 30]] 0.704442200999165592738713909247 Note that this agrees with the result in the OEIS ...


3

This gives you the irreducible polynomials up to order n - 1 in $\mathbb Z_2[x]$ n = 5; Table[Pick @@ Transpose[({#, IrreduciblePolynomialQ[#, Modulus -> 2]} & /@ (FromDigits[#, x] & /@ Tuples[{0, 1}, i]))], {i, n}] // Column However, for degree 31 there are 2^32 == 4,294,967,296 tuples to ...


1

I slightly modified the set partition code from the book Computational Discrete Mathematics by Pemmaraju and Skiena. kSetPartitions[{}, 0] := {{}} kSetPartitions[s_List, 0] := {} kSetPartitions[s_List, k_Integer] := {} /; (k > Length[s]) kSetPartitions[s_List, k_Integer] := {Map[{#} &, s]} /; (k === Length[s]) kSetPartitions[s_List, k_Integer] := ...



Only top voted, non community-wiki answers of a minimum length are eligible