Como pensou
We need answer problem in Portuguese. Need solve. Let's restate.
Polynomial p(x)=x^4 + a x^3 + b x^2 + c x -21, with a,b,c reals. Knows p(x) has four integer roots and for every integer n not multiple of 5, p(n) is multiple of 5. Determine a^2+b^2+c^2. Options: 375,600,1368,1624,2025.
We need solve. Let's analyze.
Given monic quartic with integer? It has four integer roots. Let roots r1,r2,r3,r4 integers. Product roots = -21 (constant term -21 = (-1)^4 product? For monic degree 4: constant = product roots = -21). Yes product r1 r2 r3 r4 = -21. Since integer roots, each root divisor of -21? Wait product = -21, each root integer, possible divisors ±1,±3,±7,±21. Product -21 means one negative? Actually product negative, so odd number of negative roots. Possibilities: four roots integers with product -21.
Also condition: for every integer n not divisible by 5, p(n) ≡0 mod5 (multiple of 5). Since p has integer coefficients? a,b,c reals? Wait coefficients reals but polynomial with integer roots maybe symmetric? But roots integers imply coefficients? For monic polynomial with integer roots, coefficients are integer? Elementary symmetric sums of integer roots are integers, so a,b,c integers actually. Yes.
Condition p(n) ≡ 0 mod 5 for all n not multiple of 5. Since p(x) mod5? If coefficients integer, p(x) mod5 is polynomial over F5 of degree ≤4. It vanishes on all nonzero residues mod5? F5 has 4 nonzero elements. Degree ≤4 polynomial with 4 roots? Over field, degree 4 polynomial can have at most 4 roots unless zero polynomial. Since p vanishes at 4 nonzero elements (1,2,3,4 mod5), then p(x) mod5 must be zero polynomial (all coefficients divisible by 5) because degree ≤4 and four roots? Wait if degree exactly 4, 4 roots possible, but could be scalar times (x-1)(x-2)(x-3)(x-4) = x^4 -1 over F5? Since (x-1)(x-2)(x-3)(x-4)=x^4-1 mod5? Let's compute: In F5, roots all nonzero: 1,2,3,4=-1. Product (x-1)(x-2)(x-3)(x-4) = (x^2-1)(x^2-4?) Actually (x-1)(x-4)=x^2-5x+4=x^2-1 mod5; (x-2)(x-3)=x^2-5x+6=x^2+1. Product = (x^2-1)(x^2+1)=x^4-1 mod5. Yes. So a nonzero degree 4 polynomial vanishing on all nonzero elements is c(x^4-1) with c≠0 mod5. But p has constant -21 ≡ -1 ≡4 mod5? Wait -21 mod5 = -1 ≡4. If p(x) ≡ λ(x^4-1) mod5, constant term ≡ -λ ≡4 => λ≡1? Actually -λ ≡4 => λ≡1 mod5? Since -1≡4, λ=1 gives -1≡4. So possible p(x) ≡ x^4 -1 mod5, i.e., a,b,c ≡0 mod5? Compare x^4 + a x^3 + b x^2 + c x -21 ≡ x^4 + 0 x^3 +0 x^2 +0 x +4 mod5. So a≡b≡c≡0 mod5, and constant -21≡4 yes. Thus a,b,c multiples of 5. Good.
But wait condition for every integer n not multiple of 5. It includes n ≡1,2,3,4 mod5. So yes p mod5 vanishes on all four nonzero residues. Since degree ≤4, p mod5 is scalar multiple of product ∏_{r=1}^4 (x-r). As above.
So a,b,c divisible by 5. Let a=5A, b=5B, c=5C integers.
Need find possible roots / a^2+b^2+c^2.
Polynomial p(x)=x^4 + 5A x^3 +5B x^2 +5C x -21. Four integer roots.
Product roots = -21. Sum roots = -a = -5A => multiple of 5? Sum roots ≡0 mod5. Pair sum = b =5B => multiple of 5. Sum triple = -c = -5C => multiple of 5. So all elementary symmetric sums of roots except product are multiples of 5. Product = -21 ≡4 mod5.
Let roots r_i integers. Need find multiset of four integers product -21 and elementary sums conditions? Actually a,b,c multiples of 5 means sum roots ≡0 mod5, sum pairs ≡0 mod5, sum triples ≡0 mod5 mod5. Since p mod5 = x^4 -1 = (x-1)(x-2)(x-3)(x-4) = x^4 -1? Wait product roots modulo 5? If roots modulo 5 are all nonzero distinct? Because p mod5 = x^4 -1 = ∏_{r=1}^4 (x-r) over F5. Therefore roots modulo 5 must be exactly 1,2,3,4 (multiset) in F5? Since factorization unique; each root must be congruent to one of 1,2,3,4 modulo 5 and none divisible by 5. Also product roots ≡1*2*3*4 =24≡4 mod5 = -21 mod5 yes. Since product = -21 ≡4.
So each root r_i is not divisible by 5, and their residues modulo 5 are 1,2,3,4 in some order (since four roots and four nonzero residues, each exactly once? Because product factorization degree 4; yes roots mod5 must be all four nonzero residues, each root congruent to a distinct nonzero residue). Thus {r_i mod5} = {1,2,3,4} as multiset. Also product of actual roots = -21.
Now integer roots with product -21. Possible roots: divisors ±1,±3,±7,±21. Need four integers (not necessarily distinct? Yes roots may repeat? But polynomial has four integer roots; could have multiple roots. However if repeated, modulo factorization would have repeated roots? But p mod5 has distinct roots 1,2,3,4, no repeats. Therefore roots modulo 5 distinct, so actual roots must be distinct modulo 5; hence no two roots congruent mod5. So four distinct roots among divisors, each residue 1,2,3,4 mod5. Let's list divisors of -21: 1,3,7,21,-1,-3,-7,-21. Residues mod5:
1→1
3→3
7→2
21→1 (since 21≡1)
-1→4
-3→2 (because -3≡2)
-7→3 ( -7≡3? -7+10=3)
-21→4 ( -21+25=4)
We need choose four roots with product -21, residues 1,2,3,4 distinct. Also each root not divisible by 5 automatically except? None.
Let's enumerate possible subsets of 4 divisors with product -21 and residues distinct.
Divisors: +1 (res1), +3 (res3), +7 (res2), +21 (res1), -1 (res4), -3 (res2), -7 (res3), -21 (res4).
Product of four roots = -21. Since product negative, number of negative roots odd (1 or 3).
Case 1 negative: one negative root, three positive roots. Product = (negative)*(positive product)= -21 => positive product =21. Positive divisors product for three numbers =21. Possible positive triples with product 21: 1,1,21? But roots distinct mod5? residues: 1,1,1 not distinct (need one each? But if three positive and one negative, residues among positives must cover remaining residues after negative). Product of positive =21, possible triples: (1,1,21) product21; (1,3,7) product21. But roots distinct? (1,3,7) residues 1,3,2. Then negative must have residue 4 to complete {1,2,3,4}. Negative divisor with residue4: -1 or -21. Product total: if positive (1,3,7) product21, negative -1 => product -21; negative -21 => product -441 not -21. So negative must be -1. Roots {1,3,7,-1}? But product 1*3*7*(-1)=-21 yes. Residues: 1->1, 3->3, 7->2, -1->4. All distinct. So multiset {1,3,7,-1} works? Check polynomial roots? Sum=10? 1+3+7-1=10 => a=-10 not divisible by5? Wait a=-sum = -10 divisible by5? -10 ≡0 mod5 yes. b=sum pairs? 1*3+1*7+1*(-1)+3*7+3*(-1)+7*(-1)=3+7-1+21-3-7=20? 3+7=10-1=9+21=30-3=27-7=20 divisible by5. c=-sum triples = -(1*3*7 +1*3*(-1)+1*7*(-1)+3*7*(-1)) = -(21 -3 -7 -21)= -(-10)=10 divisible by5. Constant -21 yes. So possible a=-10, b=20, c=10 => a^2+b^2+c^2=100+400+100=600. Option B. Is that unique? Need check other possibilities.
Case 1 negative product positive 21: (1,1,21) product 21. Residues 1,1,1 not distinct; need residues {1,2,3,4} with negative residue4. If positive triple (1,1,21) residues 1,1,1, missing 2,3, can't with one negative. So no.
Case 3 negatives: three negative roots, one positive. Product total = -21 => positive * product(negatives)= -21 => product(negatives)= -21? Actually three negative product negative, times positive positive => negative = -21 => product of absolute values =21? Let negative roots -a,-b,-c with a,b,c positive product abc=21? Because (-a)(-b)(-c)= -abc; times positive d = -abcd = -21 => abcd=21. So positive root d and positive abs of negatives multiply 21. Four positive integers product 21. Possibilities: {1,1,1,21}, {1,1,3,7} (unordered). Residues of actual roots: positive d residue d mod5; negatives -a etc residues = -a mod5. Need all four residues {1,2,3,4}.
Try multiset actual maybe {-1,-1,-1,21}? Product (-1)^3*21=-21. Residues: -1→4 (three times), 21→1. Missing 2,3; no.
Try { -1,-1,-3,7}? Product (-1)(-1)(-3)(7)= -21? (-1*-1*-3)= -3; *7=-21 yes. Residues: -1→4, -1→4, -3→2, 7→2. Missing 1,3; no.
Try {-1,-1,-7,3}? Product (-1*-1*-7)*3 = -21? (-1*-1=1; *-7=-7; *3=-21 yes). Residues: -1→4 twice, -7→3, 3→3: missing 1,2; no.
Try {-1,-3,-7,1}? Product (-1*-3*-7)*1 = -21? (-1*-3=3; *-7=-21; *1=-21 yes). Residues: -1→4, -3→2, -7→3, 1→1. All distinct {1,2,3,4}. So roots {-1,-3,-7,1} works? But same as positive? Actually multiset positive {1,3,7,-1} we already had. Yes.
Try {-1,-1,-21,1}? Product (-1*-1*-21)*1 = -21? (-1*-1=1; *-21=-21; *1=-21). Residues: -1→4 twice, -21→4 (since -21≡4), 1→1: missing 2,3; no.
Try {-1,-3,-1,7}? same as -1,-1,-3,7 checked.
Try {-3,-7,-1,1}? same.
Positive product 21 possibilities: 1,3,7 and negative -1; or 1,1,21 and negative? Need product positives 21 => 1*1*21=21 but negative -1 gives total -21? Actually if three positives 1,1,21 and one negative -1 product -21. Roots {1,1,21,-1}. Residues: 1→1 twice, 21→1 (since 21≡1), -1→4. Missing 2,3; no. If negative -? product of positives 21, negative must -1 for total -21. So no.
What about less than 4 roots? "possui quatro raízes inteiras" means degree 4 and all roots integer? Usually means all roots (counting multiplicity) are integers maybe. Could be repeated. We considered multiplicities maybe not explicitly but residues distinct prevents repeats? Wait if root repeated, modulo 5 repeated? But p mod5 = x^4 -1 has no repeated roots because derivative 4x^3 ≠0 mod5 since 4≠0 mod5 and x≠0. So no repeated roots modulo 5. Thus actual roots cannot be congruent mod5, but could be equal? If two roots equal same integer r, then residues same, impossible because then p has repeated root mod5. So roots distinct. Good.
Case maybe one negative root not necessarily -1? We assumed positive product 21. If one negative root n, positive roots a,b,c product abc=21. Positive divisors product 21 only (1,1,21) or (1,3,7). Because positive divisors. Negative n must product n*abc=-21 => n=-1. So only -1. Yes.
Case three negatives product abs 21: negative roots -a,-b,-c with abc=21, positive d=1? Actually positive root d * abc =21, so d and abc product 21. Since four positive integers, possibilities {1,1,1,21}, {1,1,3,7}. But d can be any divisor? Need residues cover all. We checked.
But wait could two negative roots and two positive roots? Product positive? No product -21 requires odd number negatives. So only 1 or 3 negatives.
Thus only one multiset {1,3,7,-1}. Then a^2+b^2+c^2=600. But need ensure no other a,b,c due to order? Roots multiset unique so polynomial unique? Let's compute polynomial from roots {1,3,7,-1}: (x-1)(x-3)(x-7)(x+1) =? Let's expand: (x-1)(x+1)=x^2-1; (x-3)(x-7)=x^2-10x+21; product = (x^2-1)(x^2-10x+21)=x^4 -10x^3 +21x^2 - x^2 +10x -21? Wait compute: x^2*(x^2-10x+21)=x^4-10x^3+21x^2; -1*(x^2-10x+21)= -x^2+10x-21; sum = x^4 -10x^3 +20x^2 +10x -21. So a=-10, b=20, c=10 => sum squares 600. Yes.
But let's double-check condition: For every integer n not multiple of 5, p(n) multiple of 5. Our polynomial p(x)=x^4 -10x^3 +20x^2 +10x -21 ≡ x^4 -0 -0 +0 -1 ≡ x^4 -1 mod5? Actually 20x^2≡0, 10x≡0, -21≡ -1 ≡4. Yes x^4 -1. For n not multiple 5, n^4 ≡1 mod5 by Fermat, so p(n)≡0. Good.
But wait, condition says for every integer n that is not multiple of 5, p(n) is multiple of 5. This is equivalent p(x) mod5 vanishing on all nonzero residues. We used. But is it possible p(x) mod5 = zero polynomial? Degree 4 poly zero mod5 would require all coefficients divisible by5 including leading coefficient 1 not divisible => impossible. So yes p mod5 = λ(x^4-1). Since leading coefficient 1, λ=1. So a,b,c multiples of 5 and constant -21 ≡ -1 mod5 =4. Good.
However, need be careful: The polynomial has four integer roots but maybe not necessarily all roots are integers? Wording "possui quatro raízes inteiras" means it has four integer roots (all roots are integers) likely. If it had repeated roots? Degree 4, four integer roots (counting multiplicity). Yes.
Need prove uniqueness rigorously. Let's devise elegant solution.
Given p(x)=x^4 + a x^3 + b x^2 + c x -21 with integer roots r_i. Product roots = -21. All roots not divisible by 5? Actually if a root divisible by 5, then p(5k)=? Condition n=5k? Not applicable because n multiple of5 excluded. But p(0)? n=0 multiple of5? Condition only n not multiple of5; 0 is multiple of5, excluded. But p(r)=0 for root r; if r divisible by5? Then condition doesn't force p(r) multiple of5 because r multiple of5. But polynomial degree? But product roots -21 not divisible by5? If one root divisible by5, product divisible by5, contradiction -21 not divisible by5? Wait -21 not divisible by5. Product roots = -21 not divisible by5, so no root divisible by5 (since product would be divisible by5 if any root divisible by5? Actually if one root divisible by5, product divisible by5, but -21 not divisible by5, contradiction). So roots not divisible by5. Good.
Then modulo 5, p(x) = ∏(x - r_i mod5). Since p mod5 vanishes at all nonzero residues, each nonzero residue must be a root of p mod5. Since degree 4 and there are 4 nonzero residues, the roots modulo 5 must be exactly the four nonzero residues (counting multiplicity). Therefore {r_i mod5} = {1,2,3,4}. In particular the residues are distinct, so roots distinct mod5.
Now list divisors of -21 and residues. Need choose four with product -21 and residues 1,2,3,4. Could enumerate.
Alternative: Since product roots = -21, possible roots are divisors. Let's list all divisors with residues:
1 (1), 3 (3), 7 (2), 21 (1), -1 (4), -3 (2), -7 (3), -21 (4).
Need pick four product -21. Since product negative, odd negatives => either 1 or 3 negatives.
If 1 negative: three positives product 21. Possible positive triples product 21: {1,1,21} or {1,3,7}. But residues of positives must be three distinct among {1,2,3} (since negative will provide 4). {1,1,21} residues 1,1,1 not distinct; {1,3,7} residues 1,3,2 distinct. Negative must have residue 4: options -1 or -21. But product with -21 would be 1*3*7*(-21)= -441 ≠ -21. So negative must be -1. Thus roots {1,3,7,-1}.
If 3 negatives: absolute values product 21 with one positive. Four absolute values product 21. Possibilities: {1,1,1,21} and {1,1,3,7}. Assign signs: three negatives among four abs values, positive one. Need residues of actual roots = {1,2,3,4}. Let's test possibilities.
For abs {1,1,1,21}: possible assignments:
- Three 1's negative and 21 positive: roots {-1,-1,-1,21}. Residues {4,4,4,1} not all.
- Two 1 negative, one 1 positive, 21 negative: {-1,-1,1,-21} residues {4,4,1,4} not all.
- One 1 negative, two 1 positive? But only three negatives total; if two positives among 1's and one positive 21? Wait four numbers: three negatives and one positive. The positive could be one of the 1's or 21. Cases:
Positive=21, negatives -1,-1,-1 => residues 4,4,4,1 no.
Positive=1, negatives -1,-1,-21 => residues 4,4,4,1? -21≡4, 1≡1, missing 2,3 no.
Positive=1, negatives -1,-21,-1 same. No.
For abs {1,1,3,7}: possible assignments with three negatives:
Let's enumerate all sign patterns with exactly three negatives (odd). Positive could be one of 1,1,3,7; the other three negative.
- Positive 1: roots {-1,-1,-3,-7}? Actual numbers: abs 1 negative -1, abs 1 negative -1, abs 3 negative -3, abs 7 negative -7 => {-1,-1,-3,-7}. Residues: 4,4,2,3 missing 1.
- Positive other 1 same.
- Positive 3: roots {-1,-1,3,-7}? Abs 1 neg -1, abs 1 neg -1, abs 3 positive 3, abs 7 neg -7 => residues 4,4,3,3 missing 1,2.
- Positive 7: roots {-1,-1,-3,7} => residues 4,4,2,2? 7≡2, -3≡2, missing 1,3.
- Positive? What about abs 21 not in set. So no.
Thus unique roots.
Then compute a,b,c.
Alternative using symmetric sums:
Roots 1,3,7,-1.
Sum =10 => a=-10.
Pair sum = b = 1*3+1*7+1*(-1)+3*7+3*(-1)+7*(-1)=3+7-1+21-3-7=20.
Triple sum = -c = 1*3*7 +1*3*(-1)+1*7*(-1)+3*7*(-1)=21-3-7-21=-10 => c=10.
a^2+b^2+c^2=100+400+100=600.
Answer B.
Need ensure no other polynomials? Let's consider maybe polynomial with complex roots? But statement "possui quatro raízes inteiras" means all four roots are integers (since degree 4). Yes.
Potential issue: The condition "para todo inteiro n que não seja múltiplo de 5, o valor de p(n) é múltiplo de 5". Does "múltiplo de 5" include negative multiples? Yes.
Maybe there is a catch: n not multiple of 5 includes n=±1,±2,...; p(n) multiple of 5. Since p has integer coefficients, p mod5 zero on nonzero residues. We concluded p mod5 = x^4-1. But wait, if p mod5 is degree less than 4? Leading term 1 so degree 4. Over F5, a degree 4 polynomial can vanish on 4 points without being zero; indeed possible scalar times product. So a,b,c divisible by5? Compare coefficients: p mod5 = x^4 + a x^3 + b x^2 + c x + (-21 mod5) = x^4 + a x^3 + b x^2 + c x +4. For this to equal x^4 -1 = x^4 +4 (since -1=4), coefficients of x^3,x^2,x must be 0 mod5: a≡0, b≡0, c≡0 mod5. Yes.
But wait, what if p mod5 = 2(x^4-1)? Leading coefficient would be 2, but p leading coefficient is 1 mod5 (1≠0). So no. So exactly.
Need maybe prove product roots = -21? For monic polynomial x^4 + a x^3 + b x^2 + c x -21 = ∏(x - r_i) = x^4 - (sum r_i)x^3 + (sum pairs)x^2 - (sum triples)x + product r_i. Thus product r_i = -21. Yes.
Let's craft final explanation in Portuguese.
Need be concise but complete. Include steps:
1. Since roots integers and product -21, possible roots divisors.
2. Condition modulo 5 implies p(x) ≡ x^4 -1 mod5, so roots modulo 5 are exactly 1,2,3,4; hence a,b,c multiples of 5.
3. Enumerate possible roots using product and residues.
4. Compute polynomial and sum squares.
Let's write carefully.
Potential alternative: Could derive using factorization modulo 5 directly:
p(x) ≡ (x-1)(x-2)(x-3)(x-4) mod5 = x^4 -1. Then a,b,c divisible by5. Also p(x) has integer roots; modulo 5, roots of p are 1,2,3,4. Then use integer roots divisors.
Let's ensure enumeration.
Residues:
r=1 =>1
r=3 =>3
r=7 =>2
r=21 =>1
r=-1 =>4
r=-3 =>2
r=-7 =>3
r=-21 =>4
Need choose four roots with product -21. Since product negative, odd number of negative roots.
If only one negative root n, then product of three positive roots =21. Positive triples from divisors: (1,1,21) or (1,3,7). But residues of positives must be three distinct residues from {1,2,3} (because negative provides 4). (1,1,21) residues {1,1,1} not distinct; (1,3,7) residues {1,3,2}. Thus positive roots are 1,3,7. Negative root must have residue 4 and product with positives -21 => n=-1 because n*21=-21 => n=-1. So roots {1,3,7,-1}.
If three negative roots, product of their absolute values =21 (since positive root times (-1)^3*product abs = -21 => positive * product abs =21). So four positive absolute values product 21: {1,1,1,21} or {1,1,3,7}. Assign signs to get three negatives and one positive. Check residues cannot cover {1,2,3,4}; we can state "verifica-se facilmente" or show. Let's detail:
- Absolute values {1,1,1,21}: any sign assignment with three negatives leaves at least three roots congruent to 4 (-1) or 1? Let's list possible actual multisets and residues:
* {-1,-1,-1,21}: residues 4,4,4,1 -> missing 2,3.
* {-1,-1,1,-21}: residues 4,4,1,4 -> missing 2,3.
Other assignments with positive 1? Actually there are C(4,3)=4 sign assignments? Since three negatives among four numbers; but two numbers 1 identical. The distinct actual multisets: choose which one positive. If positive 21, negatives three 1 => {-1,-1,-1,21}. If positive one 1, negatives: the other 1 and 21 and one? Wait there are three 1's and one 21. If positive is one 1, then negatives are two 1's and 21 => {-1,-1,1,-21}? Wait positive 1, negatives -1,-1,-21 => multiset {-1,-1,1,-21}. Residues 4,4,1,4. If positive 21 same as first. So only two distinct multisets, no.
- Absolute values {1,1,3,7}: possible distinct multisets:
Positive 1: negatives two 1s? Actually abs values: two 1s, 3,7. If positive one 1: negatives -1, -3, -7 => {-1,-1,-3,-7} residues 4,4,2,3 missing 1.
Positive other 1: same.
Positive 3: negatives -1,-1,-7 => {-1,-1,3,-7} residues 4,4,3,3 missing 1,2.
Positive 7: negatives -1,-1,-3 => {-1,-1,-3,7} residues 4,4,2,2 missing 1,3.
Positive? Could positive be 3 and negatives include -3? Wait abs 3 can be negative -3 or positive 3. Yes.
What about positive = 1, negatives include -7 and -3 and -1: done.
No all residues.
Thus unique.
Then compute.
Let's ensure no issue with roots order? No.
Answer B.
Let's produce final in Portuguese, with explanation. Desired oververbosity 5, so moderate. Keep final answer line exactly "Resposta: B".
Need maybe mention "a^2+b^2+c^2 = 600".
Let's craft final solution.
Potential nuance: The polynomial could have roots not necessarily distinct? But we argued distinct mod5. However, our enumeration assumed four roots distinct? Actually if repeated roots, product? But modulo 5 distinct so no repeats. Good.
Let's write:
"Como p tem coeficientes inteiros? Na verdade, como todas as raízes são inteiras, os coeficientes a,b,c são inteiros (somas simétricas)." Need justify? If roots integers, coefficients are integers by Vieta. So yes.
Then "p(x) ≡ x^4 -1 mod5" derivation:
For n=1,2,3,4 mod5, p(n)≡0. O polinômio q(x)=p(x) mod5 tem grau 4 e se anula nos quatro elementos não nulos de F5. Logo q(x)=λ(x-1)(x-2)(x-3)(x-4)=λ(x^4-1). Comparando coeficientes líderes, λ=1. Portanto p(x)≡x^4-1 mod5, donde a≡b≡c≡0 mod5.
Actually "coeficientes líderes" both 1. Yes.
Then "Assim, as raízes inteiras r_i devem ter resíduos 1,2,3,4 módulo 5, pois p mod5 = ∏(x-r_i) = x^4-1 = ∏_{k=1}^4 (x-k)."
Then enumeration.
Let's final.