Question: Write a function that takes as input a positive integer n and returns a vector containing the first n natural numbers {1,2,3,...} which do not

 Write a function that takes as input a positive integer n

Write a function that takes as input a positive integer n and returns a vector containing the first n natural numbers {1,2,3,...} which do not have either 2 or 3 as a divisor. For example, if n = 3, the function should return the vector (1,5,7). Execute your function with n= 10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!