Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Hold & Evaluate
Replies: 1   Last Post: Feb 25, 2013 2:18 AM

 Messages: [ Previous | Next ]
 Ray Koopman Posts: 3,383 Registered: 12/7/04
Re: Hold & Evaluate
Posted: Feb 25, 2013 2:18 AM

On Feb 23, 8:31 pm, =A9er=FDch Jakub <Ser...@panska.cz> wrote:
> Dear mathgroup,
> I would like to generate sequence in the form:
>
> 1/1.2, 2/2.3, 3/3.4, 4/4.5, etc.
>
> It is very simple by a Table function:
>
> Table[n/(n + 0.1 (n + 1)), {n, 1, 15}]
>
> but as there are real numbers in denominators,
> Mathematica evaluates all and generates something like:
>
> {0.833333, 0.869565, 0.882353, 0.888889, 0.892857, 0.895522, etc.}
>
> How to evaluate numerators and denominators separately
> and print the sequence in that "fraction like" form?
>
> I tested:
>
> #[[1]]/#[[2]] & /@ Table[{n, n + 0.1 (n + 1)}, {n, 1, 15}]
> and than used Hold[] and Evaluate[]:
>
> Hold[Evaluate[#[[1]]]/Evaluate[#[[2]]]] & /@
> Table[{n, n + 0.1 (n + 1)}, {n, 1, 15}]
>
> But it doesn't work as the Hold has "veto" power over any evaluation.
>
> Thanks in advance for any idea, how to do it
>
> Jakub

Table[SequenceForm[n, "/", n + .1(n+1)], {n,15}]

{1/1.2, 2/2.3, 3/3.4, 4/4.5, 5/5.6, 6/6.7, 7/7.8, 8/8.9,
9/10., 10/11.1, 11/12.2, 12/13.3, 13/14.4, 14/15.5, 15/16.6}

Date Subject Author
2/23/13 Jakub Serych
2/25/13 Ray Koopman