Kasp262e

35 Reputation

3 Badges

6 years, 150 days

MaplePrimes Activity


These are replies submitted by Kasp262e

@Carl Love No not exactly. The sum of the k-variables should be 123. So 100 + 20 + 3.

@acer 

The sequence function might be a help.

solve(sum(k_i*10^(n - i), i = 1 .. n) = 123, {k[i]}, useassumptions) assuming seq(`if`(not assigned(k[i]), 0 < k[i]*real, NULL), i = 1 .. n)

I am expectiong that

k[1] = 100
k[2] = 20
k[3] = 3

which then sums up to 123.

The k-variables should make up the digits in the number on the right side of the equation sign. 

What am I doing wrong here?

@Christian Wolinski 

I know that "assuming 0 < k[2];" would give the expected output. 

To be more specific, my goal is to create and then determine the value of the variables k_1, k_2 and k_3 in the following equation:

n := 3
solve(sum(k_i*10^(n - i), i = 1 .. n) = 123)

Somehow, I should now get, that

k_1 = 100
k_2 = 20
k_3 = 3

I do not know if this is possible, or if I have to use a matrix or something like that for handling the different variables in the sum function. 

Page 1 of 1