New answers tagged

0

Primepi (x) =e^(ln (x/ln (x))+1/ln (x*e^-2)-0.4635/(ln (x))^2) for x <10^10 have an error better that riemmannR (x) A plot may obtain with Mathematica 7 ( wolfram alpha give a plot for primepi (x) in intervals of 2*10^7 lenght but you can plot my function minus riemannR (x) in wolfram alpha and see a difernce of 200).my function is easy to calculate ...


4

There is this way: SetAttributes[test, Listable] test[n_] := FirstPosition[Reverse[#[[2 ;; Ceiling[Length[#]/2]]] &[ Divisors[n]]], _?(IntegerQ[Log[#, n]] &), 0] =!= 0 Pick[#, test[#]] &[Range[1000]]


6

I offer the following as a fast way of testing cubic and higher powers primes = Select[Range[59], PrimeQ] Get a list of all the relevant powers up to a specified limit list[nmax_] := Sort[Flatten[Table[Range[2, Floor[nmax^(1/p)]]^p, {p, Drop[primes, 1]}]]]; For example list[1000] (* {8, 27, 32, 64, 125, 128, 216, 243, 343, 512, 729, 1000} *) Define ...


3

As Mr. Wizard supposed in a comment, one can indeed use ContinuedFractionK[] here: With[{A = 3., B = 2., x = 0.1}, 1/(1 + I A x + ContinuedFractionK[-n^2/(4 n^2 - 1) x^2 A (1 - I 2 B x), 1 + I A x, {n, 2, 2000}])] 0.9197103744410972 - 0.28251974414934944 I However, if what you want is to approximate the ...


0

I don't know if this is really an answer as the question itself seems misguided. (Why would one want to "display" a massive expression even if this could be done?) Nevertheless I would like to comment on the code used by the Betatron. Hold was used for manual control of recursion, however it would be easier to avoid unwanted recursion in the first place by ...


3

A common way, for a long time, of denoting a (generalized) continued fraction is to list the partial numerators and denominators, sometimes with $+$ and fraction bars like this: $$ F = b_0+ \frac{a_1}{b_1+}\, \frac{a_2}{b_2+}\, \frac{a_3}{b_3+}\cdots $$ It is also an efficient way to store a continued fraction (cf. ContinuedFraction). What is needed is a way ...


2

C.E.: using the fourth argument of NestWhileList, All which solves the example with Mr.Wizard: NestWhileList[step, n, Signature@{1, n, ##2} =!= 0 &, All]



Top 50 recent answers are included