Invariant Polynomials
Time limit1sMemory limit512 MB
Count the dimension of the space of real polynomials in x, y of degree at most d that are invariant under rotation by 2π/n.
- Level
Medium7 of 10
- Topics
- Math, Combinatorics, Number theory, Implementation
- Solved
- No attempts yet
Problem
Consider a real polynomial in two variables. We call it invariant under the rotation by an angle if
holds for all real and .
Consider the real vector space of all two-variable polynomials of degree at most that are invariant under the rotation by . Compute the dimension of this vector space.
You may find the following remark useful: every polynomial of degree at most can be written uniquely as
for some real coefficients .
Input
A single line with two positive integers and separated by one space. Both are less than .
Output
Output a single integer , the dimension of the vector space described above.