login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A088442 A linear version of the Josephus problem. 8

%I

%S 1,3,1,3,9,11,9,11,1,3,1,3,9,11,9,11,33,35,33,35,41,43,41,43,33,35,33,

%T 35,41,43,41,43,1,3,1,3,9,11,9,11,1,3,1,3,9,11,9,11,33,35,33,35,41,43,

%U 41,43,33,35,33,35,41,43,41,43,129,131,129,131,137,139,137,139,129,131

%N A linear version of the Josephus problem.

%C Or a(n) is in A145812 such that (2n+3-a(n))/2 is in A145812 as well. Note also that a(n)+2A090569(n+1)=2n+3. [From _Vladimir Shevelev_, Oct 20 2008]

%D C. Groer, The mathematics of survival ..., Amer. Math. Monthly, 110 (No. 9, 2003), 812-825. (This is the sequence W(2n+1).)

%H Reinhard Zumkeller, <a href="/A088442/b088442.txt">Table of n, a(n) for n = 0..10000</a>

%F To get a(n), write 2n+1 as Sum b_j 2^j, then a(n) = 1 + Sum_{j odd} b_j 2^j.

%F Also, a(n) = 2*ceiling(n/2)+1-2*a(ceiling(n/2)).

%F Equals A004514 + 1. - Chris Groer (cgroer(AT)math.uga.edu), Nov 10, 2003

%e If n=4, 2n+1 = 9 = 1 + 0*2 + 0*2^2 + 1*2^3, so a(4) = 1 + 0*2 + 1*2^3 = 9.

%p a:=proc(n) local b: b:=convert(2*n+1,base,2): 1+sum(b[2*j]*2^(2*j-1),j=1..nops(b)/2) end: seq(a(n),n=0..100);

%t a[n_] := a[n]= 2*Ceiling[n/2]+1-2a[Ceiling[n/2]]

%o (Haskell)

%o a088442 = (+ 1) . a004514 -- _Reinhard Zumkeller_, Sep 26 2015

%Y Cf. A006257, A088443, A088452.

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Nov 09 2003

%E More terms from _Emeric Deutsch_, May 27 2004

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 18 21:04 EST 2018. Contains 317331 sequences. (Running on oeis4.)