login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A101905 a(1) = 1; a(n+1) = A101261(2n). 2

%I #13 May 03 2015 13:25:17

%S 1,2,4,3,8,5,9,6,16,7,14,10,21,11,19,12,32,13,24,15,34,17,30,18,45,20,

%T 36,22,47,23,40,25,64,26,44,27,59,28,51,29,74,31,56,33,73,35,61,37,93,

%U 38,67,39,87,41,72,42,103,43,78,46,99,48,83,49,128,50,88,52,111,53,92

%N a(1) = 1; a(n+1) = A101261(2n).

%C Sequence is a permutation of the positive integers.

%H Ivan Neretin, <a href="/A101905/b101905.txt">Table of n, a(n) for n = 1..10000</a>

%p A101261 := proc(nmax) local a,n,anex ; a := [1,2] ; while nops(a) < nmax do if nops(a) mod 2 = 0 then a := [op(a),1] ; else n := (nops(a)+1)/2 ; n := op(n,a) ; anex := 2 ; while anex in a or n > 1 do if not anex in a then n := n-1 ; fi ; anex := anex+1 ; od ; a := [op(a),anex] ; fi ; od ; RETURN(a) ; end: A101905 := proc(nmax) local a,n,anex ; a := A101261(2*nmax) ; for n from 2*nmax-1 to 3 by -2 do a := subsop(n=NULL,a) ; od ; RETURN(a) ; end: A101905(80) ; # _R. J. Mathar_, May 02 2007

%t a = {1}; Do[AppendTo[a, Complement[Range[Max[a] + (d = If[EvenQ[n], 1, a[[(n + 1)/2]]])], a][[d]]], {n, 2, 71}]; a (* _Ivan Neretin_, May 03 2015 *)

%Y Cf. A101261, A101906.

%K easy,nonn

%O 1,2

%A _Leroy Quet_, Dec 20 2004

%E More terms from _R. J. Mathar_, May 02 2007

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 02:34 EDT 2024. Contains 374343 sequences. (Running on oeis4.)