Question

The number 24 is exactly divisible by eight numbers (i.e. 1, 2, 3, 4, 6, 8, 12 and 24). The number 273 is also exactly divisi

A number n is considered to be a steady-p number if nP ends in the same digits. For example, the number n-25 is a steady-3 nu

The Catalan number series is given by C(n) - (2n)!/ ((n+1)!n!) where n! represents the factorial of n and n is an integer sta

*these questions are related to Matlab

The number 24 is exactly divisible by eight numbers (i.e. 1, 2, 3, 4, 6, 8, 12 and 24). The number 273 is also exactly divisible by eight numbers (i.e. 1, 3, 7, 13,21, 39, 91 and 273) There are 10 numbers in the range of 1:100 that are exactly divisible by eight numbers (i.e. 24, 30, 40, 42, 54, 56, 66, 70, 78 and 88). How many numbers in the range of n-1:20000 are exactly divisible by eight numbers? Answer:
A number n is considered to be a steady-p number if nP ends in the same digits. For example, the number n-25 is a steady-3 number since 253 15625. The number n 251 is also a steady-3 number since 2513 15813251. Determine the 18th steady-3 number that exists starting from the number 1. The 1st steady-3 number is n-1 (13 -1). The 2nd steady-2 number is n 4 (43 64) Answer:
The Catalan number series is given by C(n) - (2n)!/ ((n+1)!n!) where n! represents the factorial of n and n is an integer starting at 1. Therefore, the first 10 Catalan numbers for n-1:10 are given by: [1, 2, 5, 14, 42, 132, 429, 1430, 4862, 16796]. The sum of all the even Catalan numbers in this range is 23278 (i.e. 2+14+42+132+1430+4862+16796) Determine the sum of all even Catalan numbers in the range of n-10:20 Answer
0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

1.

% Matlab script to count the total numbers in the range of 1-20000 that are
% exactly divisible by 8 numbers
count =0; % counter to count the total numbers exactly divisible by 8 numbers
% loop to count the total numbers exactly divisible by 8 numbers
for i=1:20000
num_div=1; % increment for 1 , since 1 is divisor for all numbers
% count the number of divisors
for j=2:fix(i/2)
if mod(i,j) == 0
num_div = num_div+1;
end
end
num_div = num_div + 1; % increment for the number itself
% if number of divisors are 8 then increment the count
if num_div == 8
count = count + 1;
end
end
% display the output
fprintf('Numbers in range 1 to 20000 that are exactly divisible by eight numbers = %d\n',count);
%end of script

Output:

Numbers in range 1 to 20000 that are exactly divisible by eight numbers = 4289

Add a comment
Know the answer?
Add Answer to:
*these questions are related to Matlab The number 24 is exactly divisible by eight numbers (i.e. 1, 2, 3, 4, 6, 8, 12 and 24). The number 273 is also exactly divisible by eight numbers (i....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT