So, I need to create a function in R that takes as input an integer, S ≥ 1 and returns as output the pentagonal number which is closest to S.The output of my function should be the pentagonal number
So, I need to create a function in R that takes as input an integer, S ≥ 1 and returns as output the pentagonal number which is closest to S.The output of my function should be the pentagonal number