Formula for series (or sequence?) of $n$ values where last in series is $x times n_1$ and total is $y$.












3














I am a programmer, not a mathematician and I'm trying to solve a problem for scoring in my game. Please excuse my weak maths and lack of mathematical syntax, and sorry if this question has been asked before.



Let's say we have a game level which consists of 4 stages. As the players moves from stage to stage, the required score for each stage increases. Let's say the overall score for the level is 1000 and I want the last stage to require 4 times more score.



Let these be the variables:





  • $y$ is level total required score.


  • $n_1, n_2, n_3, n_4$ are 4 stages in level.


  • $x$ is the score requirement multiplier for the last stage ($d$).


So to represent as an equation:



$n_1 + n_2 + n_3 + n_4 = y$ where $n_4 = x times n_1$



therefore based on the values in my example the equation would be:



$n_1 + n_2 + n_3 + 4n_1 = 1000$



How do I solve for $n_1$ , $n_2$ and $n_3$ such that there is a progression in the score requirement from stage to stage?





For some reason this formula works, substituting for the variables:



$n_1 + frac {4n_1}{3} + frac {4n_1}{2} + 4n_1 = 1000$



I able to solve for $n_1$ and I get $n_1 = 120$.



This answer checks out:



$120 + frac {4 times 120}{3} + frac {4 times 120}{2} + (4 times 120) = 1000$



$120 + 160 + 240 + 480 = 1000$



But I don't understand how that works. Where do the denominators for the fractions $frac 43$ and $frac 42$ come from?



Anyone that could shed some light on how to solve this, your time would be appreciated :)










share|cite|improve this question




















  • 3




    It looks like a geometric sum. You're starting with 120. Then you add 40, and then $2times 40$ and then $2^2 times 40 ...$ So you're basically calculating $$ 120 + 40 sum_{k=0}^n 2^k $$
    – Matti P.
    Nov 21 '18 at 9:18










  • Thanks @MattiP. I wish I could read that formula... :) I think I understand the gist of it.
    – jamo
    Nov 21 '18 at 9:36
















3














I am a programmer, not a mathematician and I'm trying to solve a problem for scoring in my game. Please excuse my weak maths and lack of mathematical syntax, and sorry if this question has been asked before.



Let's say we have a game level which consists of 4 stages. As the players moves from stage to stage, the required score for each stage increases. Let's say the overall score for the level is 1000 and I want the last stage to require 4 times more score.



Let these be the variables:





  • $y$ is level total required score.


  • $n_1, n_2, n_3, n_4$ are 4 stages in level.


  • $x$ is the score requirement multiplier for the last stage ($d$).


So to represent as an equation:



$n_1 + n_2 + n_3 + n_4 = y$ where $n_4 = x times n_1$



therefore based on the values in my example the equation would be:



$n_1 + n_2 + n_3 + 4n_1 = 1000$



How do I solve for $n_1$ , $n_2$ and $n_3$ such that there is a progression in the score requirement from stage to stage?





For some reason this formula works, substituting for the variables:



$n_1 + frac {4n_1}{3} + frac {4n_1}{2} + 4n_1 = 1000$



I able to solve for $n_1$ and I get $n_1 = 120$.



This answer checks out:



$120 + frac {4 times 120}{3} + frac {4 times 120}{2} + (4 times 120) = 1000$



$120 + 160 + 240 + 480 = 1000$



But I don't understand how that works. Where do the denominators for the fractions $frac 43$ and $frac 42$ come from?



Anyone that could shed some light on how to solve this, your time would be appreciated :)










share|cite|improve this question




















  • 3




    It looks like a geometric sum. You're starting with 120. Then you add 40, and then $2times 40$ and then $2^2 times 40 ...$ So you're basically calculating $$ 120 + 40 sum_{k=0}^n 2^k $$
    – Matti P.
    Nov 21 '18 at 9:18










  • Thanks @MattiP. I wish I could read that formula... :) I think I understand the gist of it.
    – jamo
    Nov 21 '18 at 9:36














3












3








3







I am a programmer, not a mathematician and I'm trying to solve a problem for scoring in my game. Please excuse my weak maths and lack of mathematical syntax, and sorry if this question has been asked before.



Let's say we have a game level which consists of 4 stages. As the players moves from stage to stage, the required score for each stage increases. Let's say the overall score for the level is 1000 and I want the last stage to require 4 times more score.



Let these be the variables:





  • $y$ is level total required score.


  • $n_1, n_2, n_3, n_4$ are 4 stages in level.


  • $x$ is the score requirement multiplier for the last stage ($d$).


So to represent as an equation:



$n_1 + n_2 + n_3 + n_4 = y$ where $n_4 = x times n_1$



therefore based on the values in my example the equation would be:



$n_1 + n_2 + n_3 + 4n_1 = 1000$



How do I solve for $n_1$ , $n_2$ and $n_3$ such that there is a progression in the score requirement from stage to stage?





For some reason this formula works, substituting for the variables:



$n_1 + frac {4n_1}{3} + frac {4n_1}{2} + 4n_1 = 1000$



I able to solve for $n_1$ and I get $n_1 = 120$.



This answer checks out:



$120 + frac {4 times 120}{3} + frac {4 times 120}{2} + (4 times 120) = 1000$



$120 + 160 + 240 + 480 = 1000$



But I don't understand how that works. Where do the denominators for the fractions $frac 43$ and $frac 42$ come from?



Anyone that could shed some light on how to solve this, your time would be appreciated :)










share|cite|improve this question















I am a programmer, not a mathematician and I'm trying to solve a problem for scoring in my game. Please excuse my weak maths and lack of mathematical syntax, and sorry if this question has been asked before.



Let's say we have a game level which consists of 4 stages. As the players moves from stage to stage, the required score for each stage increases. Let's say the overall score for the level is 1000 and I want the last stage to require 4 times more score.



Let these be the variables:





  • $y$ is level total required score.


  • $n_1, n_2, n_3, n_4$ are 4 stages in level.


  • $x$ is the score requirement multiplier for the last stage ($d$).


So to represent as an equation:



$n_1 + n_2 + n_3 + n_4 = y$ where $n_4 = x times n_1$



therefore based on the values in my example the equation would be:



$n_1 + n_2 + n_3 + 4n_1 = 1000$



How do I solve for $n_1$ , $n_2$ and $n_3$ such that there is a progression in the score requirement from stage to stage?





For some reason this formula works, substituting for the variables:



$n_1 + frac {4n_1}{3} + frac {4n_1}{2} + 4n_1 = 1000$



I able to solve for $n_1$ and I get $n_1 = 120$.



This answer checks out:



$120 + frac {4 times 120}{3} + frac {4 times 120}{2} + (4 times 120) = 1000$



$120 + 160 + 240 + 480 = 1000$



But I don't understand how that works. Where do the denominators for the fractions $frac 43$ and $frac 42$ come from?



Anyone that could shed some light on how to solve this, your time would be appreciated :)







sequences-and-series






share|cite|improve this question















share|cite|improve this question













share|cite|improve this question




share|cite|improve this question








edited Nov 22 '18 at 7:22









mlc

4,87931332




4,87931332










asked Nov 21 '18 at 9:09









jamo

162




162








  • 3




    It looks like a geometric sum. You're starting with 120. Then you add 40, and then $2times 40$ and then $2^2 times 40 ...$ So you're basically calculating $$ 120 + 40 sum_{k=0}^n 2^k $$
    – Matti P.
    Nov 21 '18 at 9:18










  • Thanks @MattiP. I wish I could read that formula... :) I think I understand the gist of it.
    – jamo
    Nov 21 '18 at 9:36














  • 3




    It looks like a geometric sum. You're starting with 120. Then you add 40, and then $2times 40$ and then $2^2 times 40 ...$ So you're basically calculating $$ 120 + 40 sum_{k=0}^n 2^k $$
    – Matti P.
    Nov 21 '18 at 9:18










  • Thanks @MattiP. I wish I could read that formula... :) I think I understand the gist of it.
    – jamo
    Nov 21 '18 at 9:36








3




3




It looks like a geometric sum. You're starting with 120. Then you add 40, and then $2times 40$ and then $2^2 times 40 ...$ So you're basically calculating $$ 120 + 40 sum_{k=0}^n 2^k $$
– Matti P.
Nov 21 '18 at 9:18




It looks like a geometric sum. You're starting with 120. Then you add 40, and then $2times 40$ and then $2^2 times 40 ...$ So you're basically calculating $$ 120 + 40 sum_{k=0}^n 2^k $$
– Matti P.
Nov 21 '18 at 9:18












Thanks @MattiP. I wish I could read that formula... :) I think I understand the gist of it.
– jamo
Nov 21 '18 at 9:36




Thanks @MattiP. I wish I could read that formula... :) I think I understand the gist of it.
– jamo
Nov 21 '18 at 9:36










1 Answer
1






active

oldest

votes


















3














This question is a little difficult to answer mathematically, since $a+b+c+xa=1000$ has many possible solutions. So let's refine it a little bit. Let's add a requirement that each stage costs $r$ times as much as the previous stage. We can then rewrite the equation as
$$a+ar+ar^2+ar^3=1000.$$
At this point, you can just pick your favorite value of $r$ and solve for $a$. If you want each stage to cost $2$ times as much as the previous stage then
$$a+2a+4a+8a=1000$$
$$15a=1000$$
$$a=frac{200}3 approx 67.$$
This gives the value of the first stage, and then $2a, 4a,$ and $8a$ are the values of the stages afterward.






share|cite|improve this answer





















  • That makes much more sense - to define the progression amount, not the final multiple. Which means my starting point was wrong, making this really hard to solve. Thanks so much for your answer :)
    – jamo
    Nov 21 '18 at 9:28













Your Answer





StackExchange.ifUsing("editor", function () {
return StackExchange.using("mathjaxEditing", function () {
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
});
});
}, "mathjax-editing");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "69"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
noCode: true, onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3007459%2fformula-for-series-or-sequence-of-n-values-where-last-in-series-is-x-time%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









3














This question is a little difficult to answer mathematically, since $a+b+c+xa=1000$ has many possible solutions. So let's refine it a little bit. Let's add a requirement that each stage costs $r$ times as much as the previous stage. We can then rewrite the equation as
$$a+ar+ar^2+ar^3=1000.$$
At this point, you can just pick your favorite value of $r$ and solve for $a$. If you want each stage to cost $2$ times as much as the previous stage then
$$a+2a+4a+8a=1000$$
$$15a=1000$$
$$a=frac{200}3 approx 67.$$
This gives the value of the first stage, and then $2a, 4a,$ and $8a$ are the values of the stages afterward.






share|cite|improve this answer





















  • That makes much more sense - to define the progression amount, not the final multiple. Which means my starting point was wrong, making this really hard to solve. Thanks so much for your answer :)
    – jamo
    Nov 21 '18 at 9:28


















3














This question is a little difficult to answer mathematically, since $a+b+c+xa=1000$ has many possible solutions. So let's refine it a little bit. Let's add a requirement that each stage costs $r$ times as much as the previous stage. We can then rewrite the equation as
$$a+ar+ar^2+ar^3=1000.$$
At this point, you can just pick your favorite value of $r$ and solve for $a$. If you want each stage to cost $2$ times as much as the previous stage then
$$a+2a+4a+8a=1000$$
$$15a=1000$$
$$a=frac{200}3 approx 67.$$
This gives the value of the first stage, and then $2a, 4a,$ and $8a$ are the values of the stages afterward.






share|cite|improve this answer





















  • That makes much more sense - to define the progression amount, not the final multiple. Which means my starting point was wrong, making this really hard to solve. Thanks so much for your answer :)
    – jamo
    Nov 21 '18 at 9:28
















3












3








3






This question is a little difficult to answer mathematically, since $a+b+c+xa=1000$ has many possible solutions. So let's refine it a little bit. Let's add a requirement that each stage costs $r$ times as much as the previous stage. We can then rewrite the equation as
$$a+ar+ar^2+ar^3=1000.$$
At this point, you can just pick your favorite value of $r$ and solve for $a$. If you want each stage to cost $2$ times as much as the previous stage then
$$a+2a+4a+8a=1000$$
$$15a=1000$$
$$a=frac{200}3 approx 67.$$
This gives the value of the first stage, and then $2a, 4a,$ and $8a$ are the values of the stages afterward.






share|cite|improve this answer












This question is a little difficult to answer mathematically, since $a+b+c+xa=1000$ has many possible solutions. So let's refine it a little bit. Let's add a requirement that each stage costs $r$ times as much as the previous stage. We can then rewrite the equation as
$$a+ar+ar^2+ar^3=1000.$$
At this point, you can just pick your favorite value of $r$ and solve for $a$. If you want each stage to cost $2$ times as much as the previous stage then
$$a+2a+4a+8a=1000$$
$$15a=1000$$
$$a=frac{200}3 approx 67.$$
This gives the value of the first stage, and then $2a, 4a,$ and $8a$ are the values of the stages afterward.







share|cite|improve this answer












share|cite|improve this answer



share|cite|improve this answer










answered Nov 21 '18 at 9:18









DreamConspiracy

9001216




9001216












  • That makes much more sense - to define the progression amount, not the final multiple. Which means my starting point was wrong, making this really hard to solve. Thanks so much for your answer :)
    – jamo
    Nov 21 '18 at 9:28




















  • That makes much more sense - to define the progression amount, not the final multiple. Which means my starting point was wrong, making this really hard to solve. Thanks so much for your answer :)
    – jamo
    Nov 21 '18 at 9:28


















That makes much more sense - to define the progression amount, not the final multiple. Which means my starting point was wrong, making this really hard to solve. Thanks so much for your answer :)
– jamo
Nov 21 '18 at 9:28






That makes much more sense - to define the progression amount, not the final multiple. Which means my starting point was wrong, making this really hard to solve. Thanks so much for your answer :)
– jamo
Nov 21 '18 at 9:28




















draft saved

draft discarded




















































Thanks for contributing an answer to Mathematics Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


Use MathJax to format equations. MathJax reference.


To learn more, see our tips on writing great answers.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3007459%2fformula-for-series-or-sequence-of-n-values-where-last-in-series-is-x-time%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

MongoDB - Not Authorized To Execute Command

in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

Npm cannot find a required file even through it is in the searched directory