Question: Write Mathematica code using nested pure functions for the following problem. For how many integers n between 1 and 100 does 7 divide 1 +
Write Mathematica code using nested pure functions for the following problem. For how many integers n between 1 and 100 does 7 divide 1 + 2 + . . . + n?
So far I have Map[Function[n, Divisible[Sum[i, {i, 1, n}], #]], Range[100]] &[7] which only returns a list of True/false but I need the number of Trues and what numbers are divisible by 7. I've tried using the Select function but it's not working. Please help!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
