Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to understand a problem im reading and produce a recursive formula for the problem.

The problem, an ice cream van can serve j^2 customers at a time, However the van needs time to make new ice cream so j is equal to the time since it last made ice cream.

Given a set of customers coming by the minute in groups: x = {1,13,15,2}

what would be the best times to serve? in this case it would be the 3rd and 4th minutes.. as min(15,3^2) = 9 and min(2,3^2) = 9

How can produce a recursive formula for such a problem?

share|cite|improve this question
up vote 1 down vote accepted

It sounds like you want the $j$ that results in $\max_j (\min(\text{customers}(j), j^2)$. Is that what you want?

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.