Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

New answers tagged

4

The approach suggested by yarchik can be accelerated by two orders of magnitude by performing the computations with machine precision numbers instead of exact numbers and then rounding, and by using ParallelDo: SetSharedVariable[s] s = {}; ParallelDo[If[IntegerQ[(1 + a*Round[Sqrt[1./(a*a) + 12. (a + 1)], 10^-10])/6], AppendTo[s, a]], {a, 1, 10^9}] // ...


3

You can replace Table with Do Do[If[IntegerQ[1/6 (1 + Sqrt[1 + 12 a^2 + 12 a^3])], Print[a]], {a, 1 + 10^(11), 10^4 + 10^(11)}] but it is still slow. Try to bring your diophantine equation to some known type.


6

Here is a direct (recursive) implementation of the DTW. You need three pieces: a distance function, construction of the DTW matrix, and a function to find the best path through the DTW matrix. (*distance function*) dist[s_, t_] := Abs[s - t]; (*boundary conditions*) dtw[1, 1] = dist[x[[1]], y[[1]]]; dtw[1, j_] := dtw[1, j] = dist[x[[1]], y[[j]]] + dtw[1, j ...


6

Dynamic time warping (DTW) is a built-in function by the name of WarpingDistance as of Mathematica 11.


3

For positive real x, x^(1/x) == 1/2 is equivalent to x == 1/2^x: x == 1/2^x /. {x -> Root[ {-2 Log[2]^2 + 2^(1 + #1) Log[2]^2 #1 &, 0.64118574450498598449} ]} // FullSimplify (* True *) Or you can get numerical evidence: N[ x^(1/x) /. {x -> Root[ {-2 Log[2]^2 + 2^(1 + #1) Log[2]^2 #1 &, 0....


Top 50 recent answers are included