# Tag Info

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 ...

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]]

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 ...

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]

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