Cody

# Problem 46676. List the erauqs

Solution 3331493

Submitted on 22 Oct 2020 by Tim
• Size: 40
• This is the leading solution.
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
n = 99; assert(isempty(erauqs(n)))

2   Pass
n = 1000; y_correct = [100 144 169 400 441 900 961]; assert(isequal(erauqs(n),y_correct))

3   Pass
n = 10000; y_correct = [100 144 169 400 441 900 961 1089 9801 10000]; assert(isequal(erauqs(n),y_correct))

4   Pass
n = 100000; y = erauqs(n); len_correct = 29; yp_correct = [10404 10609 12100 12544 12769 14400 14884 16900 40000 40401 44100 44521 48400 48841 67600 90000 90601 96100 96721]; assert(isequal(length(y),len_correct) && isequal(y(11:29),yp_correct))

5   Pass
n = 1000000; y = erauqs(n); len_correct = 32; yp_correct = [108900 980100 1000000]; assert(isequal(length(y),len_correct) && isequal(y(end-2:end),yp_correct))

6   Pass
n = 1e8; y = erauqs(n); len_correct = 100; yp_correct = [4456321 4498641 4888521 9678321]; assert(isequal(length(y),len_correct) && isequal(y([76 78 83 94]),yp_correct))

### Community Treasure Hunt

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

Start Hunting!