Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A114144
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A114144 A variant of Josephus Problem in which three persons are to be eliminated at the same time. +0
4
3, 1, 3, 5, 8, 11, 14, 17, 21, 25, 29, 33, 37, 41, 45, 1, 3, 5, 7, 9 (list; graph; listen)
OFFSET

1,1

COMMENT

This is a variant of the Josephus Problem. When there are 3m persons, the first process of elimination starts with the first person, the second with the (m+1)-st person and the third with the (2m+1)-st person. We suppose that the first process comes first, the second process secondly and the third process thirdly. J(n) is the position of the survivor when there are n persons. Our sequence is {J(3), J(6), J(9), J(12), .....} = {3, 1, 3, 5, 8, 11, 14, 17, 21, 25, 29, 33

REFERENCES

R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics,Addison-Wesley Publishing Company, 1994. P.9-10.

FORMULA

The function J(n) is defined only for integers n that have 3 as a factor. J(6m+3) = 2J(3m)+2m+2 (if J(3m) =< m), J(6m+3) = 2J(3m)+2m+3 (if m+1 =< J(3m) =< 2m) and J(6m+3) = 2J(3m)-4m+1 (if 2m+1 =< J(3m) ). J(6m) = 2J(3m)+2m-1 (if J(3m) =< 2m) and J(6m) = 2J(3m)-4m-1 (if J(3m) > 2m ).

EXAMPLE

If there are 15 persons, then 2,7,12,4,9,14,6,11,1,10,15,5,3,13 are to be eliminated and the survivor is 8. Therefore J(15) = 8.

MATHEMATICA

Clear[jose]; (*This function is defined only for numbers that are multiples of 3.*)jose[3] = 3; jose[n_?(IntegerQ[ #/3] &)] := If[Mod[n, 6] == 0, If[jose[n/2] < n/3 + 1, 2jose[n/2] + n/3 - 1, 2jose[n/2] - 2n/3 - 1], Which[jose[(n - 3)/2] < (n - 3)/6 +1, 2jose[(n - 3)/2] + (n - 3)/3 + 2, (n - 3)/6 < jose[(n - 3)/2] < (n - 3)/3 + 1, 2jose[(n - 3)/2] + (n - 3)/3 + 3, (n - 3)/3 < jose[(n - 3)/2], 2jose[(n - 3)/2] - 2(n - 3)/3 + 1]];

CROSSREFS

Cf. A113648, A006257.

Sequence in context: A016646 A160552 A006257 this_sequence A050820 A133179 A146908

Adjacent sequences: A114141 A114142 A114143 this_sequence A114145 A114146 A114147

KEYWORD

easy,nonn

AUTHOR

Satoshi Hashiba, Daisuke Minematsu and Ryohei Miyadera (miyadera1272000(AT)yahoo.co.jp), Feb 03 2006

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified December 21 10:15 EST 2009. Contains 171081 sequences.


AT&T Labs Research