PDA

View Full Version : fun math problem



Lightlawbliss
2014-09-05, 12:51 PM
Given the formula ((2x-y)^n-(2x)^n-(-y)^n)/n, find the largest value of n such that all coefficients in the expanded formula are integers.
everyone's favorite giant triangle of numbers

Asta Kask
2014-09-05, 01:12 PM
I have discovered a truly marvellous solution to this, which this post is too narrow to contain.

Chen
2014-09-05, 01:41 PM
There's no equality in your statement. All three constants (x, y and n) can be arbitrarily large integers and meet your criteria. The result of the calculation may not be an integer, but that doesnt appear to be required by what you are asking.

S@tanicoaldo
2014-09-05, 01:56 PM
Fun and math cannot be in the same phrase.

That is a fundamental rule of the universe.

Brother Oni
2014-09-05, 02:29 PM
Fun and math cannot be in the same phrase.

That is a fundamental rule of the universe.

I disagree - it depends on what the numbers are crunching. For example, I had fun working out how much energy dragonfire would need to barbecue a naked person, then applying that amount of heat energy to a person in full plate harness and seeing the effects (I believe the armour hits ~80C, but the person is otherwise fine).

De Orator
2014-09-05, 03:12 PM
Find the largest value of n where (2x-y)^n/n-(2x)^n-(-y)^n results in all constants are integers.
everyone's favorite giant triangle of numbers


What does any of that even mean?

I could write a bunch of numerals and signs too, if I were so disposed, and thereafter I could deign it 'fun'. It would not make it so. If you want to make something that is engaging - universally 'fun' - you need to define your terms from the outset and ensure that your audience know what the meaning of your signs are. Fundamentally, it's a matter of communication. Mathematics is a language. It is the language of logic - indeed, the language of science, in spite of Latin's claim to that title - and therefore it needs to be translatable into plain language in order to be understood. The first rule of rhetoric - the first rule of effective communication - is that one must tailor one's message to one's audience. If you were addressing a number of well-versed students, or teachers, or academics, then, perhaps, your 'fun' "problem" would have been appropriate. But you were not. You were addressing the internet. The collective intelligence quotient of the internet is negative five. I checked. That means that the vast majority of your audience don't know what "(2x-y)^n/n-(2x)^n-(-y)^n" is supposed to mean, let alone how to "find" any "values" as a result of this paltry amount of information.

I mean, from the context I have no scope to infer anything. What are 'constants'? What are 'integers?' I know from my own experience that 'integers' are 'whole' numbers; but even that does not help me in solving your 'problem'. I don't know what 'constants' are; I assume they are numbers which constantly retain the same value. I could be - indeed, I probably am - wrong there: I don't know! I don't know the definition of your presented terms.

Perhaps I should admit the source of my enmity at this juncture. Indeed, if I do not it would be perverse. I would appear to be a lunatic who is irrationally enraged by mathematical 'problems'. That is not entirely the case. Consequently, it would be an injustice if I made it appear so.

I have never understood mathematics. As a child I found the subject to be incredibly dense. I recall asking my teacher banal questions such as 'why does five plus five equal ten?'; to which I would receive equally bland replies such as "well, if you had five oranges in a bag and then put another five oranges in the same bag, the bag would be filled with ten oranges!".

I liked those days. Those days made sense.


After several years of simple arithmetic, I encountered algebra. Some of my contemporaries struggled with it. I did not. We had a good teacher. She explained that you could, by using your imagination, assign values to certain numbers. Thereafter, you could solve 'problems', based on the presented information.

Those were the days.

Soon after that, my teacher - Miss Young - left the school. The teacher that replaced her understood mathematics. She REALLY understood it. Consequently, she had no time for those who did not naturally grasp her chosen discipline.

She would bark phrases at us with no context; she would expect us to solve 'problems' without any notion of why the problem needed solved. She would ask us to "find the largest value of n where (2x-y)^n/n-(2x)^n-(-y)^n results in all constants are integers", without telling us what 'x' was equal to, or - may the gods have mercy on our souls - why we would ask such a question in the first place. And so, I came to despise mathematics. A whole field of knowledge: A whole language, as I alluded at the start of this complaint!

I hated it. Because someone did not define what their symbols and words meant.

Because someone understood it naturally, and assumed that anyone who did not was just 'stupid'. Because someone believed that, because they found it 'fun', everyone -EVERYONE- else should.

And if they don't find it fun? Well, that doesn't matter. They're stupid. They don't understand the beauty of the scientific language. The scientific language is pure; it's only for those who can truly grasp what it means. No need to share the knowledge, or anything like that. That is a ridiculous notion! No, knowledge of this kind is to be hoarded! When those who seek it decide to question you, answer cryptically! Fire undefined problems at them! Use bizarre terms that they don't understand! It worked for the legal profession for centuries! It still works for the financial sector! It can work for mathematics too! Just make sure that you place yourself on a pedestal above all of the plebians!

Or, just present your 'problem' in a simple, understandable language. Ask your question in a manner that a layperson can understand. Most people can surprise you by dint of their knowledge or natural intellect; they just have to understand what you're asking them in order to do so. So please, oh please, ask your question again. But in doing so, please try to ensure that anyone - not just your friends and contemporaries, but any-and-everyone - can understand what you are actually asking.

Lightlawbliss
2014-09-05, 03:39 PM
(snip)

Thank you for taking the time to explain your opinion and ask politely for further info. I apologize for my habitual assumptions and will try to

For this problem, the values of x and y are irrelevant. The are simply placeholders.

To explain what I mean by constants, let us look at the expanded equation

Ax^n+Bx^(n-1)+Cx^(n-2)+Dx^(n-3)...
A, B, C, D, and so on are the constants I am talking about.

As for context... I stink at converting problems into word problems and would likely only confuse people more if I tried.

I think I got everything you were asking for in your post, feel free to let me know If I missed something.

edit: Also, thanks to your post I noticed I had an order of operations error in my retyping that caused the answer to be 1. Fixed that.

edit 2: If it helps you to understand, the -(2x)^n just removes the first term of the expansion, and the -(-y)^n removes the last term of the expansion

blunk
2014-09-05, 03:56 PM
Ax^n+Bx^(n-1)+Cx^(n-2)+Dx^(n-3)...
A, B, C, D, and so on are the constants I am talking about.Coefficients, then?

I still don't understand your question, but maybe that clears things a bit :smallwink:

Edit: is this a right restatement?

"Given the formula ((2x-y)^n - (2x)^n - (-y)^n) / n, find the largest value of n such that the expanded formula has only integer coefficients."

Something like that?

Lightlawbliss
2014-09-05, 04:07 PM
Coefficients, then?

I still don't understand your question, but maybe that clears things a bit :smallwink:

I was taught to call them constants, but Wikipedia does call them coefficients so sure.

is there any particular part that is causing you to not understand?

blunk
2014-09-05, 04:30 PM
I was taught to call them constants, but Wikipedia does call them coefficients so sure.They're constants, too, but since they're part of a polynomial, saying "coefficients" is more specific and prevents the sort of confusion that you had to respond to earlier :smallsmile:


is there any particular part that is causing you to not understand?"all integer coefficients". This could mean "all the coefficients are integers" or it could mean "the coefficients span the entire set of integers".

Edit to add: from context I'm guessing that it's not the latter, but ideally I shouldn't have to guess, at all.

Edit 2: my latest suggestion:

"Given the formula ((2x-y)^n - (2x)^n - (-y)^n) / n, find the largest value of n such that all coefficients in the expanded formula are integers."

blunk
2014-09-05, 04:43 PM
I hated it. Because someone did not define what their symbols and words meant.

Because someone understood it naturally, and assumed that anyone who did not was just 'stupid'. Because someone believed that, because they found it 'fun', everyone -EVERYONE- else should.It's true, math (and I'm painting in broad broad strokes) is strongly intuitive, and people who "get it" more can take much longer strides than those who get it less.

Sorry to hear that some have made you feel stupid for not getting it. The irony is, there are so many forms of math, and you might find that you suck at trig proofs and rule at vector calculus, and might even consider the latter (dare I say) fun if you were allowed to express things in your own terms first and then translate them into the "accepted" forms later.

But no pressure. Math doesn't really care if you hate it or love it, does it? :smallwink:

Heliomance
2014-09-05, 06:02 PM
I have a maths degree. I "get" maths. That still doesn't look like something I'd tackle for fun. I would look very strangely at anyone that found polynomial expansion fun.

Lightlawbliss
2014-09-05, 06:53 PM
I have a maths degree. I "get" maths. That still doesn't look like something I'd tackle for fun. I would look very strangely at anyone that found polynomial expansion fun.

Then I guess you would look at Pascal very strangely.

blunk
2014-09-05, 07:05 PM
I have a maths degree. I "get" maths. That still doesn't look like something I'd tackle for fun.I have a minor, which gave me an appreciation of just how broad and deep math is. Then life experience taught me that nearly anything of sufficient breadth and depth can be intriguing (and fun) to somebody.


I would look very strangely at anyone that found polynomial expansion fun.And what does that say, exactly, and about whom?

Lightlawbliss
2014-09-05, 08:42 PM
...

Edit 2: my latest suggestion:

"Given the formula ((2x-y)^n - (2x)^n - (-y)^n) / n, find the largest value of n such that all coefficients in the expanded formula are integers."

After consideration, I will agree your wording is likely better then what I had. I have updated the first post.

JBPuffin
2014-09-05, 08:43 PM
SNIP

You know, I'm kind of a math nerd, but I have to agree on the "why" not being answered. We've been indoctrinated into a system of numerals when for thousands of years different cultures counted differently. And with mathematics and language in general being constructs designed to simplify communication, it's all technically just common imagination...but I still find it fun. It could be just me being happy I understand it so well *shrug*. Go figure.

Now, an answer...sadly, I haven't gotten that far into my education. When I do, though, I'll no doubt come back to something like this in my spare time :smallsmile:.

Errata
2014-09-05, 08:50 PM
If I'm understanding the problem statement, then the coefficients of the expanded form are:
N=2 : 4/2
N=3 : 12/3, 6/3
N=4 : 32/4, 24/4, 8/4
N=5 : 80/5, 80/5, 40/5, 10/5
N=6 : 192/6, 240/6, 160/6 (NOT integer), 60/6, 12/6
etc.

If so then they should be integers for prime numbers and powers of two. In other words there is no maximum.

Lightlawbliss
2014-09-05, 09:09 PM
If I'm understanding the problem statement, then the coefficients of the expanded form are:
N=2 : 4/2
N=3 : 12/3, 6/3
N=4 : 32/4, 24/4, 8/4
N=5 : 80/5, 80/5, 40/5, 10/5
N=6 : 192/6, 240/6, 160/6 (NOT integer), 60/6, 12/6
etc.

If so then they should be integers for prime numbers and powers of two. In other words there is no maximum.

The prime numbers one isn't perfect, but you are correct on powers of 2, the max is 2^infinity.

blunk
2014-09-05, 09:22 PM
After consideration, I will agree your wording is likely better then what I had. I have updated the first post.Yay! Now I turn it over to people who actually have a chance of solving it. :smalltongue:

Errata
2014-09-05, 09:23 PM
I don't know how to prove any of that mathematically, I just wrote a quick C program to calculate the coefficients. It looked like it worked for the powers of two and primes that I tested. But I was only able to calculate up to around N=41 before the coefficients started overflowing 64 bit integers.



#include <stdio.h>
typedef unsigned long long uint64;
int main(void)
{
int i, j, k;
uint64 coeff[60], coeff1[60], coeff2[60];
coeff[0] = 1;
coeff[1] = 2;
for (i = 2; i <= 50; i++) {
coeff2[0] = 0;
coeff1[i] = 0;
for (j = 0; j < i; j++) {
coeff1[j] = coeff[j];
coeff2[j+1] = coeff[j] * 2;
if (coeff[j] > (1ull<<62))
break;
}
if (j < i)
break;
for (j = 0; j <= i; j++)
coeff[j] = coeff1[j] + coeff2[j];
for (j = 1; j < i; j++) {
if (coeff[j] % i)
break;
}
if (i <= 11) {
printf("N=%d: ", i);
for (k = i; k >= 0; k--)
printf("%lld ", coeff[k]);
printf((j == i) ? "(OK)\n" : "(FAIL)\n");
} else if (j == i)
printf("%d, ", i);
}
printf("too large at %d\n", i);
return 0;
}

Chen
2014-09-08, 06:48 AM
The prime numbers one isn't perfect, but you are correct on powers of 2, the max is 2^infinity.

The statement "the max is 2^infinity" is one that would give anyone with a solid understanding of math, fits. That is an absurd statement. There is no maximum if the set of answers in unbounded at the high end.

Lightlawbliss
2014-09-08, 10:23 AM
The statement "the max is 2^infinity" is one that would give anyone with a solid understanding of math, fits. That is an absurd statement. There is no maximum if the set of answers in unbounded at the high end.

I know many people who disagree with you on that. They prefer something that describes the situation to just saying there is no max, similar to saying the limit as x goes to 0 of 1/x^2 is infinity. you can quickly look at it and see there is no actual value, but it tells you more then just "it doesn't exist".

Heliomance
2014-09-08, 11:32 AM
I know many people who disagree with you on that. They prefer something that describes the situation to just saying there is no max, similar to saying the limit as x goes to 0 of 1/x^2 is infinity. you can quickly look at it and see there is no actual value, but it tells you more then just "it doesn't exist".

"The limit as x goes to 0 is infinity" is a very different statement to "the maximum value is infinity".

Lightlawbliss
2014-09-08, 12:27 PM
"The limit as x goes to 0 is infinity" is a very different statement to "the maximum value is infinity".

To each their own I guess.

Heliomance
2014-09-09, 02:29 PM
To each their own I guess.

You can say that the supremum is infinity, but "maximum" means it attains it, and infinity is impossible to attain.

Even still, "the supremum is 2^infinity" is nonsensical. It's just infinity.

Errata
2014-09-09, 06:03 PM
The prime numbers one isn't perfect, but you are correct on powers of 2, the max is 2^infinity.

What's the smallest prime number that doesn't work?

Lightlawbliss
2014-09-09, 10:42 PM
What's the smallest prime number that doesn't work?

I don't remember and currently have deadlines to meet. If you can find a mathematical proof for the primes I will have no problem saying an expansion must have been wrong.

golentan
2014-09-09, 11:35 PM
You can say that the supremum is infinity, but "maximum" means it attains it, and infinity is impossible to attain.

Even still, "the supremum is 2^infinity" is nonsensical. It's just infinity.

I'm with heliomance on this. There is no maximum, you can always pick a higher number. Saying the maximum is infinity is silly. If you have a problem where you're trying to find the maximum value of something and it doesn't have a bounded value by the equation given, what's the point, and where's the fun?

Jay R
2014-09-10, 06:45 AM
I don't remember and currently have deadlines to meet. If you can find a mathematical proof for the primes I will have no problem saying an expansion must have been wrong.

Yes, of course it's always true for prime numbers.

The (n-x)-th coefficient in the series will be [(2^x) * COMBIN(n,x) / n, where x is between 1 and n-1 inclusive.

COMBIN(n,x) = (n!) / (x!)(n-x)! This number is in Pascal's triangle, and is always an integer. If it has a factor of n, then the whole coefficient must be an integer.

If n is prime, then there is a factor of n in the numerator, from n!. This cannot be factored. There is no n term in the denominator, which is the factorial of 2 numbers less than n. So dividing by n will leave the whole coefficient an integer.

QED.

Lightlawbliss
2014-09-10, 09:32 AM
Yes, of course it's always true for prime numbers.

The (n-x)-th coefficient in the series will be [(2^x) * COMBIN(n,x) / n, where x is between 1 and n-1 inclusive.

COMBIN(n,x) = (n!) / (x!)(n-x)! This number is in Pascal's triangle, and is always an integer. If it has a factor of n, then the whole coefficient must be an integer.

If n is prime, then there is a factor of n in the numerator, from n!. This cannot be factored. There is no n term in the denominator, which is the factorial of 2 numbers less than n. So dividing by n will leave the whole coefficient an integer.

QED.

If you are correct then I am wrong (looks like it might work but thanks to before stated deadlines don't have time to check).

lio45
2014-09-10, 10:01 AM
Ignoring the division by n for now, we can see that the two last terms of the formula are always canceling the first and last items of the expansion: - 2nxn /n and - (-1)nyn.

So, each of the two "side ones" in the Pascal triangle (http://www.mathsrevision.net/advanced-level-maths-revision/pure-maths/algebra/binomial-series) disappears in the end. (The right one would have been 1/n, so always a fraction, capping n at 1 if it stayed there.)

So, the triangle:

First line (2)1 (-1)1

Second line 221 21(-1)12 (-1)21

Third line 231 22(-1)13 21(-1)23 (-1)21

We can see we can easily start ignoring the minus ones regardless of the power as they have no bearing on the fractionality of the coefficient.

Fourth line 241 234 226 214 201

(Bringing back the division by n that we left off the screen for clarity, we can easily verify at this stage that the terms that matter on the fourth line are 32/4 (integer), 24/4 (integer), 8/4 (integer). So, all integers.)


On the nth line of the triangle, the rth coefficient is 2n-r times the rth number of the nth line of the Pascal triangle which is n!/(r!(n-r)!). Divided by n, of course.

i.e.

2n-r(n-1)!
----------
r!(n-r)!


So, the problem becomes, this, above, has to be an integer for all values of r from 1 to n-1 (we can ignore the first and last terms as they're cancelled in the formula).

2n-r is always an integer so it doesn't bring anything more to the table, so we can ignore it.

I am pretty sure there's no upper limit to n satisfying the condition of this quotient being an integer:
(n-1)!
-------
r!(n-r)!

So, at first sight, no upper limit to n.

Take everything I've written with a huge grain of salt, it's been well over a decade since I last did such things and found out I was extremely rusty.

Edit: It's obvious that Jay R knows what he's talking about!! You're right, let's keep (n)!/(r!(n-r)!) and the division by n separate.

Problem reduces itself to, for the n you pick, for all possible values of r from 1 to n-1, (n)!/(r!(n-r)!) has to be divisible by n. Correct?

Asta Kask
2014-09-10, 10:08 AM
QED.

QCD.

Ten characters minimum.

lio45
2014-09-10, 10:14 AM
If you are correct then I am wrong (looks like it might work but thanks to before stated deadlines don't have time to check).

Be honest, are you making us do (or at least double-check) your school work?

Asta Kask
2014-09-10, 10:17 AM
Be honest, are you making us do (or at least double-check) your school work?

Is that even allowed here?

Lightlawbliss
2014-09-10, 10:23 AM
Be honest, are you making us do (or at least double-check) your school work?

no. I enjoyed the problem when an old friend gave it to me and felt others would enjoy it too.
(not to mention i'm in dif eq)

Marcivo
2014-09-12, 01:04 AM
All right. This whole thread is bugging me.

I hold two BSci degrees in Maths and Physics. I'm the math nerd among all of my friends who are math nerds. I've learned to trust my gut when it comes to math and math-people, and my gut's telling me, right now, that this is either somebody's homework or a random solved problem pulled off the internet.

But if it's not, and this is the part I keep coming back to, then why post it here? If anything, we have a forum specifically devoted to science and technology, a forum where the problem might be better presented as an object for serious mutual discourse and not a cryptic, unsolicited challenge to weed out those who "get it" and those who don't.

Lightlawbliss
2014-09-12, 09:07 AM
All right. This whole thread is bugging me.

I hold two BSci degrees in Maths and Physics. I'm the math nerd among all of my friends who are math nerds. I've learned to trust my gut when it comes to math and math-people, and my gut's telling me, right now, that this is either somebody's homework or a random solved problem pulled off the internet.

But if it's not, and this is the part I keep coming back to, then why post it here? If anything, we have a forum specifically devoted to science and technology, a forum where the problem might be better presented as an object for serious mutual discourse and not a cryptic, unsolicited challenge to weed out those who "get it" and those who don't.

...There is a science and technology section?... *looks a forum main page* That's what I get for stopping at the word mad.

It may have been a random problem from the internet before I got it, but if so then my google fu can't find it.

Jay R
2014-09-12, 01:29 PM
no. I enjoyed the problem when an old friend gave it to me and felt others would enjoy it too.
(not to mention i'm in dif eq)

Then where did the deadline you mentioned come from?

Lightlawbliss
2014-09-12, 03:30 PM
Then where did the deadline you mentioned come from?

three papers due today and a test monday.