title: how to put the results in a table or array in mathematica?
body: <p>Hi
  I have a list of numbers for example k_1,k_2,...k_n, and f is a function.
  Now I apply f on the list of numbers and I need those numbers such that f is increasing,i.e.</p>
  
  <pre><code>f(k_i)&gt;f(k_j) for any i&gt;j .
  </code></pre>
  
  <p>I can get the results number k_i's each in different line, but I need the results in one table separated with comma or something else and counting the number of results.</p>
  
  <p>For example:</p>
  
  <pre><code>k = Table[k1, k2, k3, k4, k5, k6, k7, k8, k9, k10];
  count = 0;
  i=1;
  For[j = i, j &lt;= 10, j++, 
    If[f[k[[j]]] - f[k[[i]]] &gt; 0, i = j; Print["k", i];
     count = count + 1]];
  Print["count= ", count]
  </code></pre>
  
  <p>I got the result like:</p>
  
  <pre><code>k2
  k3
  k5
  k9
  count=4
  </code></pre>
  
  <p>but I need the results to be together: </p>
  
  <pre><code>{k2,k3,k5,k9} 
  count=4
  </code></pre>
  
  <p>any idea?</p>
  
  <p>thanks</p>