tapatia00

12 Reputation

One Badge

18 years, 148 days

MaplePrimes Activity


These are answers submitted by tapatia00

Hi, I need help.

I need to write a program that, for input integer n > 0, output the row vector [k1,k2 . . . , kn].
For example, when input n = 8, the output is [1, 4, 11, 31, 83, 227, 616, 1674].
 
 This is what I have:
harmonic1 := proc ( n )
   local s, h, k, j;    h := LinearAlgebra[Dimension](x);
   s := 0;
   for k from 1 to h do     
      while n > 0 do

         s := s + 1/j[K];    
      end do;    end do;
   return s; end proc;
 

But is not woking.

Can some one help me please

Thanks ^_^

Page 1 of 1