CTK Exchange
Front Page
Movie shortcuts
Personal info
Awards
Reciprocal links
Terms of use
Privacy Policy

Interactive Activities

Cut The Knot!
MSET99 Talk
Games & Puzzles
Arithmetic/Algebra
Geometry
Probability
Eye Opener
Analog Gadgets
Inventor's Paradox
Did you know?...
Proofs
Math as Language
Things Impossible
My Logo
Math Poll
Other Math sit's
Guest book
News sit's

Recommend this site

Manifesto: what CTK is about Search CTK Buying a book is a commitment to learning Table of content Products to download and subscription Things you can find on CTK Chronology of updates Email to Cut The Knot Recommend this page

CTK Exchange

Subject: "Josephus Flavius (correction)"     Previous Topic | Next Topic
Printer-friendly copy     Email this topic to a friend    
Conferences The CTK Exchange Thoughts and Suggestions Topic #40
Reading Topic #40
David Turner
guest
May-14-08, 08:17 AM (EST)
 
"Josephus Flavius (correction)"
 
   Sorry, I transcribed the last case of the mathematical version of the solution incorrectly; it'should have been (f(n-q, p) - r)(p/(1-p)). A clearer statement is as follows:


let q(n, p) = (q - r(n, p))/p,
r(n, p) = n (mod p),
g(n, p) = f(n - q(n, p), p) - r(n, p)
then f(n, p) is defined piecewise as:
0, n = 1
f(n - 1, p) + p (mod n), n < p
g(n, p) + n, g(n, p) < 0
g(n, p) + q(g(n, p), p - 1)) otherwise.

My e-mail address is dkturner@gmail.com, let me know if you need further explanation, and especially if you have a better way of stating the definition of f :-)


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top
alexbadmin
Charter Member
2225 posts
May-14-08, 09:42 AM (EST)
Click to EMail alexb Click to send private message to alexb Click to view user profileClick to add this user to your buddy list  
1. "RE: Josephus Flavius (correction)"
In response to message #0
 
   I do not know whether there is any better way to define your function. But you may want to check (if you have not yet) with the "Project Euler" site (https://projecteuler.net/) which is specifically designed to consider problems whose solution may require programming and computer experimentation.


  Alert | IP Printer-friendly page | Reply | Reply With Quote | Top

Conferences | Forums | Topics | Previous Topic | Next Topic

You may be curious to have a look at the old CTK Exchange archive.
Please do not post there.

Copyright © 1996-2018 Alexander Bogomolny

Search:
Keywords:

Google
Web CTK