Cody

# Problem 43753. Laguerre Polynomial

Solution 1077737

Submitted on 8 Dec 2016 by Kensuke Fujita
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
x = 6; y_correct = [1,0,0,0,0,0,0;1,1,0,0,0,0,0;2,4,1,0,0,0,0;6,18,9,1,0,0,0;24,96,72,16,1,0,0;120,600,600,200,25,1,0;720,4320,5400,2400,450,36,1]; assert(isequal(laguerre(x),y_correct))

y = 1 y = 1 1 y = 1 0 1 1 y = 1 0 1 1 2 0 y = 1 0 1 1 2 4 y = 1 0 0 1 1 0 2 4 1 y = 1 0 0 1 1 0 2 4 1 6 0 0 y = 1 0 0 1 1 0 2 4 1 6 18 0 y = 1 0 0 1 1 0 2 4 1 6 18 9 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 0 0 0 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 96 0 0 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 96 72 0 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 96 72 16 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 0 0 0 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 0 0 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 600 0 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 600 200 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 600 200 25 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 0 0 0 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 0 0 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 0 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 2400 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 2400 450 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 2400 450 36 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1

2   Pass
x = 1; y_correct = [1,0;1,1]; assert(isequal(laguerre(x),y_correct))

y = 1 y = 1 1 y = 1 0 1 1

3   Pass
x = 3; y_correct = [1,0,0,0;1,1,0,0;2,4,1,0;6,18,9,1]; assert(isequal(laguerre(x),y_correct))

y = 1 y = 1 1 y = 1 0 1 1 y = 1 0 1 1 2 0 y = 1 0 1 1 2 4 y = 1 0 0 1 1 0 2 4 1 y = 1 0 0 1 1 0 2 4 1 6 0 0 y = 1 0 0 1 1 0 2 4 1 6 18 0 y = 1 0 0 1 1 0 2 4 1 6 18 9 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1

4   Pass
x = 10; y_correct = [1,0,0,0,0,0,0,0,0,0,0;1,1,0,0,0,0,0,0,0,0,0;2,4,1,0,0,0,0,0,0,0,0;6,18,9,1,0,0,0,0,0,0,0;24,96,72,16,1,0,0,0,0,0,0;120,600,600,200,25,1,0,0,0,0,0;720,4320,5400,2400,450,36,1,0,0,0,0;5040,35280,52920,29400,7350,882,49,1,0,0,0;40320,322560,564480,376320,117600,18816,1568,64,1,0,0;362880,3265920,6531840,5080320,1905120,381024,42336,2592,81,1,0;3628800,36288000,81648000,72576000,31752000,7620480,1058400,86400,4050,100,1]; assert(isequal(laguerre(x),y_correct))

y = 1 y = 1 1 y = 1 0 1 1 y = 1 0 1 1 2 0 y = 1 0 1 1 2 4 y = 1 0 0 1 1 0 2 4 1 y = 1 0 0 1 1 0 2 4 1 6 0 0 y = 1 0 0 1 1 0 2 4 1 6 18 0 y = 1 0 0 1 1 0 2 4 1 6 18 9 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 0 0 0 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 96 0 0 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 96 72 0 y = 1 0 0 0 1 1 0 0 2 4 1 0 6 18 9 1 24 96 72 16 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 0 0 0 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 0 0 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 600 0 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 600 200 0 y = 1 0 0 0 0 1 1 0 0 0 2 4 1 0 0 6 18 9 1 0 24 96 72 16 1 120 600 600 200 25 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 0 0 0 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 0 0 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 0 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 2400 0 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 2400 450 0 y = 1 0 0 0 0 0 1 1 0 0 0 0 2 4 1 0 0 0 6 18 9 1 0 0 24 96 72 16 1 0 120 600 600 200 25 1 720 4320 5400 2400 450 36 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1 5040 0 0 0 0 0 0 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1 5040 35280 0 0 0 0 0 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1 5040 35280 52920 0 0 0 0 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1 5040 35280 52920 29400 0 0 0 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1 5040 35280 52920 29400 7350 0 0 y = 1 0 0 0 0 0 0 1 1 0 0 0 0 0 2 4 1 0 0 0 0 6 18 9 1 0 0 0 24 96 72 16 1 0 0 120 600 600 200 25 1 0 720 4320 5400 2400 450 36 1 5040 35280 52920 ...