login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A178853 "Josephus problem": n persons stand in a circle and eliminate every seventh person counting clockwise until only person a(n) is remaining. 2
1, 2, 3, 2, 4, 5, 5, 4, 2, 9, 5, 12, 6, 13, 5, 12, 2, 9, 16, 3, 10, 17, 1, 8, 15, 22, 2, 9, 16, 23, 30, 5, 12, 19, 26, 33, 3, 10, 17, 24, 31, 38, 2, 9, 16, 23, 30, 37, 44, 1, 8, 15, 22, 29, 36, 43, 50, 57, 5, 12, 19, 26, 33, 40, 47, 54, 61, 68, 6, 13, 20, 27, 34, 41, 48, 55, 62, 69, 76 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

REFERENCES

L. Euler, Observationes circa novum et singulare progressionum genus. In: Novi Comment. Akadem. Petropol. Vol.20 (1775) [From Roland Schroeder (florola(AT)gmx.de), Jul 13 2010]

LINKS

Table of n, a(n) for n=1..79.

Eric Weisstein's World of Mathematics, Josephus Problem. [From Robert G. Wilson v, Jul 31 2010]

Index entries for sequences related to the Josephus Problem

MATHEMATICA

(* First do *) Needs["Combinatorica`"] (* then *) f[n_] := Last@ InversePermutation@ Josephus[n, 7]; Array[f, 79] (* Robert G. Wilson v, Jul 31 2010 *)

PROG

(Other) DERIVE - program R(x) := VECTOR(y, y, 1, x) g(v, k) := VECTOR(ELEMENT(v, n), n, 1, IF(k = DIMENSION(v), DIMENSION(v) - 1, MOD(k, DIMENSION(v)))) f(v, k) := VECTOR(ELEMENT(v, n), n, IF(k = DIMENSION(v), DIMENSION(v) + 1, MOD(k, DIMENSION(v)) + 1), DIMENSION(v)) H(v, k) := APPEND(f(v, k), g(v, k)) i(v, k) := DELETE_ELEMENT(H(v, k), DIMENSION(v)) j(v, k) := ITERATES(i(w, k), w, v, DIMENSION(v) - 1) jo(x, k) := ITERATE(i(w, k), w, R(x), x - 1) VECTOR((jo(x, 7))sub1, x, 1, 100)

CROSSREFS

Sequence in context: A090321 A241255 A174625 * A120641 A008666 A240854

Adjacent sequences:  A178850 A178851 A178852 * A178854 A178855 A178856

KEYWORD

nonn

AUTHOR

Roland Schroeder (florola(AT)gmx.de), Jun 18 2010

EXTENSIONS

Several other versions of this sequence are already in the OEIS. - N. J. A. Sloane, Jun 24 2010

a(29) onwards from Robert G. Wilson v, Jul 31 2010

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 27 15:27 EDT 2020. Contains 338035 sequences. (Running on oeis4.)