Coefficients of $(1+x+x^2)^2018$ The Next CEO of Stack OverflowHow to compute $I(n)=int_0^1x_1^aint_x_1^1x_2^acdotsint_x_n-1^1x_n^adx_ncdots dx_2dx_1$?Number of possible results in election with one of candidates getting more then 50% votesLinear recursion with coefficients depending on nCoefficients of exponential generating functionsHow do you solve a two variable 2nd degree polynomialDo all polynomials of degree n with indeterminate coefficients have Galois groups that are isomorphic to Sn?Closed Form Expression of sum with binomial coefficientSolutions of $lfloor 4xrfloor+lfloor 3xrfloor=1$Trigonometric/polynomial equations and the algebraic nature of trig functionscoefficients of $x^k$ and $x^k+1$Divisiblity of binomial coefficients
Physiological effects of huge anime eyes
My ex-girlfriend uses my Apple ID to login to her iPad, do I have to give her my Apple ID password to reset it?
Is dried pee considered dirt?
Is a distribution that is normal, but highly skewed, considered Gaussian?
Towers in the ocean; How deep can they be built?
How did Beeri the Hittite come up with naming his daughter Yehudit?
Reshaping json / reparing json inside shell script (remove trailing comma)
What day is it again?
how one can write a nice vector parser, something that does pgfvecparseA=B-C; D=E x F;
Why don't programming languages automatically manage the synchronous/asynchronous problem?
How to get the last not-null value in an ordered column of a huge table?
What was Carter Burke's job for "the company" in Aliens?
Can I board the first leg of the flight without having final country's visa?
What does "shotgun unity" refer to here in this sentence?
Is French Guiana a (hard) EU border?
IC has pull-down resistors on SMBus lines?
Vector calculus integration identity problem
Is it correct to say moon starry nights?
Which one is the true statement?
Is there an equivalent of cd - for cp or mv
Is there a difference between "Fahrstuhl" and "Aufzug"?
Can I calculate next year's exemptions based on this year's refund/amount owed?
what's the use of '% to gdp' type of variables?
How to avoid supervisors with prejudiced views?
Coefficients of $(1+x+x^2)^2018$
The Next CEO of Stack OverflowHow to compute $I(n)=int_0^1x_1^aint_x_1^1x_2^acdotsint_x_n-1^1x_n^adx_ncdots dx_2dx_1$?Number of possible results in election with one of candidates getting more then 50% votesLinear recursion with coefficients depending on nCoefficients of exponential generating functionsHow do you solve a two variable 2nd degree polynomialDo all polynomials of degree n with indeterminate coefficients have Galois groups that are isomorphic to Sn?Closed Form Expression of sum with binomial coefficientSolutions of $lfloor 4xrfloor+lfloor 3xrfloor=1$Trigonometric/polynomial equations and the algebraic nature of trig functionscoefficients of $x^k$ and $x^k+1$Divisiblity of binomial coefficients
$begingroup$
The question is
How many of the coefficients of $(1+x+x^2)^2018$ are not divisible by 3?
Somebody asked me the question, and I have no idea how to solve it. I am not sure if the coefficients are known to have a closed form either.
I guess that the question might be solvable using a combinatorics way, but not sure either. Thanks.
sequences-and-series combinatorics algebra-precalculus polynomials binomial-coefficients
$endgroup$
add a comment |
$begingroup$
The question is
How many of the coefficients of $(1+x+x^2)^2018$ are not divisible by 3?
Somebody asked me the question, and I have no idea how to solve it. I am not sure if the coefficients are known to have a closed form either.
I guess that the question might be solvable using a combinatorics way, but not sure either. Thanks.
sequences-and-series combinatorics algebra-precalculus polynomials binomial-coefficients
$endgroup$
$begingroup$
Mathematica says it's 576:Length[Select[(Mod[#, 3] & /@ CoefficientList[(1 + x + x^2)^2018, x]), # != 0 &]]
.
$endgroup$
– JimB
Mar 19 at 21:50
add a comment |
$begingroup$
The question is
How many of the coefficients of $(1+x+x^2)^2018$ are not divisible by 3?
Somebody asked me the question, and I have no idea how to solve it. I am not sure if the coefficients are known to have a closed form either.
I guess that the question might be solvable using a combinatorics way, but not sure either. Thanks.
sequences-and-series combinatorics algebra-precalculus polynomials binomial-coefficients
$endgroup$
The question is
How many of the coefficients of $(1+x+x^2)^2018$ are not divisible by 3?
Somebody asked me the question, and I have no idea how to solve it. I am not sure if the coefficients are known to have a closed form either.
I guess that the question might be solvable using a combinatorics way, but not sure either. Thanks.
sequences-and-series combinatorics algebra-precalculus polynomials binomial-coefficients
sequences-and-series combinatorics algebra-precalculus polynomials binomial-coefficients
asked Mar 19 at 21:24
Kay K.Kay K.
6,9401337
6,9401337
$begingroup$
Mathematica says it's 576:Length[Select[(Mod[#, 3] & /@ CoefficientList[(1 + x + x^2)^2018, x]), # != 0 &]]
.
$endgroup$
– JimB
Mar 19 at 21:50
add a comment |
$begingroup$
Mathematica says it's 576:Length[Select[(Mod[#, 3] & /@ CoefficientList[(1 + x + x^2)^2018, x]), # != 0 &]]
.
$endgroup$
– JimB
Mar 19 at 21:50
$begingroup$
Mathematica says it's 576:
Length[Select[(Mod[#, 3] & /@ CoefficientList[(1 + x + x^2)^2018, x]), # != 0 &]]
.$endgroup$
– JimB
Mar 19 at 21:50
$begingroup$
Mathematica says it's 576:
Length[Select[(Mod[#, 3] & /@ CoefficientList[(1 + x + x^2)^2018, x]), # != 0 &]]
.$endgroup$
– JimB
Mar 19 at 21:50
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
If $p$ is a prime and $m geq 1$, then by the Freshman's dream,
$$ (X + Y)^p^m equiv X^p^m + Y^p^m pmodp. $$
So, expanding $2018 = sum_kgeq 0 a_k 3^k$, then
beginalign*
(1+x+x^2)^2018
= prod_k geq 0 left( (1 + x + x^2)^3^k right)^a_k
equiv prod_k geq 0 left( 1 + x^3^k + x^2cdot 3^k right)^a_k pmod3
endalign*
Now, from $ 2018 = 2 + 2cdot3^2 + 2cdot3^3 + 2cdot3^5 + 2cdot3^6 $, we have $a_k = 2$ when $k = 0, 2, 3, 5, 6$ and $a_k = 0$ otherwise. Moreover,
$$ left( 1 + x^3^k + x^2cdot 3^k right)^2
equiv left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 $$
Plugging this back,
beginalign*
(1 + x + x^2)^2018
&equiv prod_k in 0, 2, 3, 5, 6 left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 \
&= (1 + 2x) (1 + 2x^3) (1 + 2x^3^2) (1 + 2x^3^3)^2 \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + 2x^3^6)^2 (1 + 2x^3^7) \
&equiv (1 + 2x^3^0) (1 + 2x^3^1) (1 + 2x^3^2) (1 + x^3^3 + x^2cdot 3^3) \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + x^3^6 + x^2cdot 3^6) (1 + 2x^3^7) pmod3
endalign*
If we expand the last product, no two terms have the same exponent, and so, there are total $2^6 times 3^2 = 576$ terms with coefficients not divisible by $3$.
$endgroup$
$begingroup$
Wow. This is amazing. Thanks a lot!
$endgroup$
– Kay K.
Mar 19 at 22:51
$begingroup$
@KayK. No problem :)
$endgroup$
– Sangchul Lee
Mar 19 at 22:59
1
$begingroup$
@SangchulLee: Nice presentation. (+1)
$endgroup$
– Markus Scheuer
Mar 20 at 9:27
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3154629%2fcoefficients-of-1xx22018%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
$begingroup$
If $p$ is a prime and $m geq 1$, then by the Freshman's dream,
$$ (X + Y)^p^m equiv X^p^m + Y^p^m pmodp. $$
So, expanding $2018 = sum_kgeq 0 a_k 3^k$, then
beginalign*
(1+x+x^2)^2018
= prod_k geq 0 left( (1 + x + x^2)^3^k right)^a_k
equiv prod_k geq 0 left( 1 + x^3^k + x^2cdot 3^k right)^a_k pmod3
endalign*
Now, from $ 2018 = 2 + 2cdot3^2 + 2cdot3^3 + 2cdot3^5 + 2cdot3^6 $, we have $a_k = 2$ when $k = 0, 2, 3, 5, 6$ and $a_k = 0$ otherwise. Moreover,
$$ left( 1 + x^3^k + x^2cdot 3^k right)^2
equiv left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 $$
Plugging this back,
beginalign*
(1 + x + x^2)^2018
&equiv prod_k in 0, 2, 3, 5, 6 left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 \
&= (1 + 2x) (1 + 2x^3) (1 + 2x^3^2) (1 + 2x^3^3)^2 \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + 2x^3^6)^2 (1 + 2x^3^7) \
&equiv (1 + 2x^3^0) (1 + 2x^3^1) (1 + 2x^3^2) (1 + x^3^3 + x^2cdot 3^3) \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + x^3^6 + x^2cdot 3^6) (1 + 2x^3^7) pmod3
endalign*
If we expand the last product, no two terms have the same exponent, and so, there are total $2^6 times 3^2 = 576$ terms with coefficients not divisible by $3$.
$endgroup$
$begingroup$
Wow. This is amazing. Thanks a lot!
$endgroup$
– Kay K.
Mar 19 at 22:51
$begingroup$
@KayK. No problem :)
$endgroup$
– Sangchul Lee
Mar 19 at 22:59
1
$begingroup$
@SangchulLee: Nice presentation. (+1)
$endgroup$
– Markus Scheuer
Mar 20 at 9:27
add a comment |
$begingroup$
If $p$ is a prime and $m geq 1$, then by the Freshman's dream,
$$ (X + Y)^p^m equiv X^p^m + Y^p^m pmodp. $$
So, expanding $2018 = sum_kgeq 0 a_k 3^k$, then
beginalign*
(1+x+x^2)^2018
= prod_k geq 0 left( (1 + x + x^2)^3^k right)^a_k
equiv prod_k geq 0 left( 1 + x^3^k + x^2cdot 3^k right)^a_k pmod3
endalign*
Now, from $ 2018 = 2 + 2cdot3^2 + 2cdot3^3 + 2cdot3^5 + 2cdot3^6 $, we have $a_k = 2$ when $k = 0, 2, 3, 5, 6$ and $a_k = 0$ otherwise. Moreover,
$$ left( 1 + x^3^k + x^2cdot 3^k right)^2
equiv left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 $$
Plugging this back,
beginalign*
(1 + x + x^2)^2018
&equiv prod_k in 0, 2, 3, 5, 6 left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 \
&= (1 + 2x) (1 + 2x^3) (1 + 2x^3^2) (1 + 2x^3^3)^2 \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + 2x^3^6)^2 (1 + 2x^3^7) \
&equiv (1 + 2x^3^0) (1 + 2x^3^1) (1 + 2x^3^2) (1 + x^3^3 + x^2cdot 3^3) \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + x^3^6 + x^2cdot 3^6) (1 + 2x^3^7) pmod3
endalign*
If we expand the last product, no two terms have the same exponent, and so, there are total $2^6 times 3^2 = 576$ terms with coefficients not divisible by $3$.
$endgroup$
$begingroup$
Wow. This is amazing. Thanks a lot!
$endgroup$
– Kay K.
Mar 19 at 22:51
$begingroup$
@KayK. No problem :)
$endgroup$
– Sangchul Lee
Mar 19 at 22:59
1
$begingroup$
@SangchulLee: Nice presentation. (+1)
$endgroup$
– Markus Scheuer
Mar 20 at 9:27
add a comment |
$begingroup$
If $p$ is a prime and $m geq 1$, then by the Freshman's dream,
$$ (X + Y)^p^m equiv X^p^m + Y^p^m pmodp. $$
So, expanding $2018 = sum_kgeq 0 a_k 3^k$, then
beginalign*
(1+x+x^2)^2018
= prod_k geq 0 left( (1 + x + x^2)^3^k right)^a_k
equiv prod_k geq 0 left( 1 + x^3^k + x^2cdot 3^k right)^a_k pmod3
endalign*
Now, from $ 2018 = 2 + 2cdot3^2 + 2cdot3^3 + 2cdot3^5 + 2cdot3^6 $, we have $a_k = 2$ when $k = 0, 2, 3, 5, 6$ and $a_k = 0$ otherwise. Moreover,
$$ left( 1 + x^3^k + x^2cdot 3^k right)^2
equiv left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 $$
Plugging this back,
beginalign*
(1 + x + x^2)^2018
&equiv prod_k in 0, 2, 3, 5, 6 left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 \
&= (1 + 2x) (1 + 2x^3) (1 + 2x^3^2) (1 + 2x^3^3)^2 \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + 2x^3^6)^2 (1 + 2x^3^7) \
&equiv (1 + 2x^3^0) (1 + 2x^3^1) (1 + 2x^3^2) (1 + x^3^3 + x^2cdot 3^3) \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + x^3^6 + x^2cdot 3^6) (1 + 2x^3^7) pmod3
endalign*
If we expand the last product, no two terms have the same exponent, and so, there are total $2^6 times 3^2 = 576$ terms with coefficients not divisible by $3$.
$endgroup$
If $p$ is a prime and $m geq 1$, then by the Freshman's dream,
$$ (X + Y)^p^m equiv X^p^m + Y^p^m pmodp. $$
So, expanding $2018 = sum_kgeq 0 a_k 3^k$, then
beginalign*
(1+x+x^2)^2018
= prod_k geq 0 left( (1 + x + x^2)^3^k right)^a_k
equiv prod_k geq 0 left( 1 + x^3^k + x^2cdot 3^k right)^a_k pmod3
endalign*
Now, from $ 2018 = 2 + 2cdot3^2 + 2cdot3^3 + 2cdot3^5 + 2cdot3^6 $, we have $a_k = 2$ when $k = 0, 2, 3, 5, 6$ and $a_k = 0$ otherwise. Moreover,
$$ left( 1 + x^3^k + x^2cdot 3^k right)^2
equiv left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 $$
Plugging this back,
beginalign*
(1 + x + x^2)^2018
&equiv prod_k in 0, 2, 3, 5, 6 left( 1 + 2x^3^k right)left(1 + 2 x^3^k+1right) pmod3 \
&= (1 + 2x) (1 + 2x^3) (1 + 2x^3^2) (1 + 2x^3^3)^2 \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + 2x^3^6)^2 (1 + 2x^3^7) \
&equiv (1 + 2x^3^0) (1 + 2x^3^1) (1 + 2x^3^2) (1 + x^3^3 + x^2cdot 3^3) \
&quad times (1 + 2x^3^4) (1 + 2x^3^5) (1 + x^3^6 + x^2cdot 3^6) (1 + 2x^3^7) pmod3
endalign*
If we expand the last product, no two terms have the same exponent, and so, there are total $2^6 times 3^2 = 576$ terms with coefficients not divisible by $3$.
answered Mar 19 at 22:47
Sangchul LeeSangchul Lee
96.3k12171282
96.3k12171282
$begingroup$
Wow. This is amazing. Thanks a lot!
$endgroup$
– Kay K.
Mar 19 at 22:51
$begingroup$
@KayK. No problem :)
$endgroup$
– Sangchul Lee
Mar 19 at 22:59
1
$begingroup$
@SangchulLee: Nice presentation. (+1)
$endgroup$
– Markus Scheuer
Mar 20 at 9:27
add a comment |
$begingroup$
Wow. This is amazing. Thanks a lot!
$endgroup$
– Kay K.
Mar 19 at 22:51
$begingroup$
@KayK. No problem :)
$endgroup$
– Sangchul Lee
Mar 19 at 22:59
1
$begingroup$
@SangchulLee: Nice presentation. (+1)
$endgroup$
– Markus Scheuer
Mar 20 at 9:27
$begingroup$
Wow. This is amazing. Thanks a lot!
$endgroup$
– Kay K.
Mar 19 at 22:51
$begingroup$
Wow. This is amazing. Thanks a lot!
$endgroup$
– Kay K.
Mar 19 at 22:51
$begingroup$
@KayK. No problem :)
$endgroup$
– Sangchul Lee
Mar 19 at 22:59
$begingroup$
@KayK. No problem :)
$endgroup$
– Sangchul Lee
Mar 19 at 22:59
1
1
$begingroup$
@SangchulLee: Nice presentation. (+1)
$endgroup$
– Markus Scheuer
Mar 20 at 9:27
$begingroup$
@SangchulLee: Nice presentation. (+1)
$endgroup$
– Markus Scheuer
Mar 20 at 9:27
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3154629%2fcoefficients-of-1xx22018%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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
$begingroup$
Mathematica says it's 576:
Length[Select[(Mod[#, 3] & /@ CoefficientList[(1 + x + x^2)^2018, x]), # != 0 &]]
.$endgroup$
– JimB
Mar 19 at 21:50