All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars perplexus dot info Another Locker Puzzle (Posted on 2006-06-23) There are N closed lockers numbered 1,2,...., N, each assigned to a different person. The first of these N persons opens all lockers. The second person goes to every second locker and closes them. Then, the third person goes and alters the state of every third locker- that is, opens the locker if closed, or closes it if open. The fourth person alters the state of every fourth locker, and so on, until the last (Nth) person alters the state of just the Nth locker.

At the conclusion of this process, it is observed that the total number of closed lockers is precisely sixty-eight (68) times that of the total number of open lockers, with the total number of open lockers being a prime number.

Determine the value of N. How many lockers end up open?

(Inspired by the lockers problem submitted by Erin.)

 See The Solution Submitted by K Sengupta No Rating Comments: ( Back to comment list | You must be logged in to post comments.) Solution, non program (spoiler) Comment 3 of 3 | For the ratio of closed to open lockers to be 68, the value of
N is (68-1)*(68+1) = 4623

The previous problem showed that the number of open lockers is the number of perfect squares that are N or less, ie:
int(sqrt(N))
So the closed lockers is N minus int(sqrt(N))
So an approximate solution, at least if N is close to a perfect square:

(N - sqrt(N)) /  sqrt(N) = 68  (approx.)
(N^2 - 2 N^(3/2) + N) / N   =  68^2 (approx.)
N - 2 sqrt(N) - (68^2 -1)  = 0  (approx.)
M= sqrt(N) = (69, -67)    (I said it was approximate)
Trial and error shows that for N=4623 = 67*69 the ratio of closed to open lockers is 68.

Consider the ratio to be K instead of 68.
For N=(K-1)*(K+1) = K^2 - 1,
the # of open lockers is K-1
the # of closed lockers is  K^2 - 1 - (K-1) = K^2 - K = K(K-1)
So the ratio of closed to open lockers is  K(K-1) / (K-1) = K

Edited on June 23, 2006, 5:03 pm
 Posted by Larry on 2006-06-23 17:02:08 Please log in:

 Search: Search body:
Forums (0)
{"ft_lang_label":"__label__en","ft_lang_prob":0.942095,"math_prob":0.97410446,"size":1736,"snap":"2020-45-2020-50","text_gpt3_token_len":524,"char_repetition_ratio":0.17090069,"word_repetition_ratio":0.0508982,"special_character_ratio":0.33064517,"punctuation_ratio":0.10406091,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.99611187,"pos_list":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20],"im_url_duplicate_count":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-11-29T04:30:46Z\",\"WARC-Record-ID\":\"<urn:uuid:f6a28f02-0d71-4718-bd76-e982c79fb3d8>\",\"Content-Length\":\"13700\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:40f80230-a4b2-4d12-908c-a6fe4fcdb0cd>\",\"WARC-Concurrent-To\":\"<urn:uuid:bf28fd23-b1ba-4435-bebc-916afd46d17b>\",\"WARC-IP-Address\":\"65.98.103.122\",\"WARC-Target-URI\":\"http://perplexus.info/show.php?pid=4726&cid=32931\",\"WARC-Payload-Digest\":\"sha1:KKA3L4OOBOAEULUSACI6I6W2FSIAWEI6\",\"WARC-Block-Digest\":\"sha1:WUGERH6SVFFDW5XFIWXC6JN5GLKIXFN4\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-50/CC-MAIN-2020-50_segments_1606141196324.38_warc_CC-MAIN-20201129034021-20201129064021-00536.warc.gz\"}"}