Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. 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

There is a formula in wikipedia for the general case of josepus problem

Josephus Problem

But there is no reference for it, I don't know where it came from and I need too find out... Maybe Donald Knuth's Art of Programming?

share|cite|improve this question
I believe it comes from "Concrete Mathematics" – vonbrand Jan 23 '13 at 19:40

In "Concrete Mathematics" by Graham, Knuth, Patashnik. Look in Chapter 3: Integer functions.

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.