Tough one...

Lazaraus
Posers and Puzzles 26 Mar '03 03:03
1. 26 Mar '03 03:032 edits
A set of numbers as follows in 5 colums:

1______2______3______4______5
9______8______7______6______-
-______10_____11_____12_____13
17____16_____15_____14______-
-______18_____19_____20_____21

and so on (ignore the - and _ I've included them to make formatting better).

If I asked what column is 18 in, you would say column 2.
The problem is as follows.

Derive a formula which will provide the column any specific number lies in given that the above pattern continues to infinity. i.e. the number x lies in column y.

Good luck.
2. Acolyte
26 Mar '03 17:39
Originally posted by Lazaraus
A set of numbers as follows in 5 colums:

1______2______3______4______5
9______8______7______6______-
-______10_____11_____12_____13
17____16_____15_____14______-
-______18_____19_____20_____21

and so on (ignore the - and _ I've included them to make formatting better).

If I asked what column is 18 in, you would say column 2.
The problem is as ...[text shortened]... that the above pattern continues to infinity. i.e. the number x lies in column y.

Good luck.

y = min(f(x-1)+1,f(-x)+2)

where f(a) = b : 0&lt;=b&lt;=7 and b=a (mod 8)
3. 26 Mar '03 22:59
Originally posted by Acolyte