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!)
A109852 a(1)=1; a(2) = 2; for n >= 1 and 1 <= k < 2^n, a(2^n+k) is the least multiple of a(2^n-k) not included earlier and a(2^n) is the least number not included earlier. 3

%I #37 May 19 2019 14:51:18

%S 1,2,3,4,6,8,5,7,10,16,12,20,9,14,11,13,22,28,18,40,24,32,30,21,15,48,

%T 36,44,27,26,17,19,34,52,54,88,72,96,45,42,60,64,120,80,90,56,66,39,

%U 33,70,63,100,84,112,50,35,25,104,78,68,51,38,23,29,46,76,102,136,156,208

%N a(1)=1; a(2) = 2; for n >= 1 and 1 <= k < 2^n, a(2^n+k) is the least multiple of a(2^n-k) not included earlier and a(2^n) is the least number not included earlier.

%C Every number appears and no number is repeated.

%C Conjecture: a(2^n) is prime if n is not 0 nor 2.

%C Conjecture: for n>2, every odd prime >4 is encountered in order at a(2^n-1), a(2^n). - _Bill McEachen_, May 06 2014

%H Alois P. Heinz, <a href="/A109852/b109852.txt">Table of n, a(n) for n = 1..10000</a>

%H <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>

%e a(8) = 7 as the least number not included earlier. a(9) = 2*a(8) = 2*5=10,

%e a(10) = 2*a(6) = 16, a(11) = 2*a(5) = 12, a(12)= 5*a(4) = 20 as 8, 12 and 16 have already been included.

%p did := [1]; lef := []; for n from 2 to 1000 do lef := [op(lef),n]; od : tak2n := proc(n2n) local i; global lef; i := op(1,lef); lef := subsop(1=NULL,lef); RETURN(i); end : tak := proc(n2n) local noffs,need,lefi,nindx,aa,mul; global lef,did; for noffs from -1 to -n2n+1 by -1 do nindx := n2n+noffs; aa := did[nindx]; for mul from 2 to 10000 do need := aa*mul; if member(need,lef,'lefi') = true then break; fi; od : lef := subsop(lefi=NULL,lef); printf("%d,",need); did := [op(did),need]; od : RETURN(ret); end : printf("1,"); for bas from 1 to 5 do nstrt := 2^bas; a := tak2n(nstrt); printf("%d,",a); did := [op(did),a]; tak(nstrt); od : # _R. J. Mathar_, Mar 27 2006

%p # second Maple program:

%p ina:= proc(n) evalb(n<3) end:

%p a:= proc(n) option remember; local k, i, t;

%p if n<3 then n

%p else a(n-1);

%p k:= n-2^ilog2(n);

%p t:= `if`(k=0, 1, a(n-2*k));

%p for i from 2*t by t while ina(i) do od;

%p ina(i):= true; i

%p fi

%p end:

%p seq(a(n), n=1..70); # _Alois P. Heinz_, Feb 07 2011

%t f[s_] := Block[{k = 2, len = Length@s}, exp = Ceiling[Log[2, len]]; m = s[[2^exp - len + 1]]; While[MemberQ[s, k*m], k++ ]; Append[s, k*m]]; Rest@Nest[f, {1, 1}, 70] (* the programming trick is to set a(0)=1 *) (* _Robert G. Wilson v_ *)

%Y Cf. A109853, A308301 (inverse).

%K nonn,look

%O 1,2

%A _Amarnath Murthy_, Jul 07 2005

%E More terms from _R. J. Mathar_, Mar 27 2006

%E Edited and extended by _Robert G. Wilson v_, Jun 14 2006

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 April 17 23:23 EDT 2024. Contains 371767 sequences. (Running on oeis4.)