Problem 60996. Dickson Polynomials

Return the coefficients of nth (n>=0) Dickson polynomial of the 1st kind as follows -
1st row of the output will be the coefficients of x, and, 2nd row of the output will be the coefficients of alpha.
When formulating the coefficitients of a variables, for terms where the other variable is present - consider the value of the other variable as 1. See examples below for a better understanding.
%Examplesa
n=2;
D2(x, alpha) = x^2 - 2*alpha
Output = [1 0 -2; 0 -2 1]
n=3;
D3(x, alpha) = x^3 - 3*x*alpha
Output = [1 0 -3 0; 0 0 -1 1]
n=5;
D5(x, alpha) = x^5 - 5*x^3*alpha + 5*x*alpha^2
% x (alpha=1) = 1*x^5 - 5*x^3*1 + 5*x*1^2 = [1 0 -5 0 5 0].*[x^5 x^4 x^3 x^2 x^1 x^0]
% alpha (x=1) = alpha^0*1^5 - 5*1^3*alpha^1 + 5*1*alpha^2
% = [0 0 0 5 -5 1].*[alpha^5 alpha^4 alpha^3 alpha^2 alpha^1 alpha^0]
Output = [1 0 -5 0 5 0; 0 0 0 5 -5 1]
Only vectorized solutions will be accepted. Check the test suite for banned functions.

Solution Stats

77.78% Correct | 22.22% Incorrect
Last Solution submitted on Sep 10, 2025

Solution Comments

Show comments

Problem Recent Solvers6

Suggested Problems

More from this Author35

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!