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

 

Logo

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 56th year, we are closing in on 350,000 sequences, and we’ve crossed 9,700 citations (which often say “discovered thanks to the OEIS”).

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
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, 36, 44, 27, 26, 17, 19, 34, 52, 54, 88, 72, 96, 45, 42, 60, 64, 120, 80, 90, 56, 66, 39, 33, 70, 63, 100, 84, 112, 50, 35, 25, 104, 78, 68, 51, 38, 23, 29, 46, 76, 102, 136, 156, 208 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Every number appears and no number is repeated.

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

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

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..10000

Index entries for sequences that are permutations of the natural numbers

EXAMPLE

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

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.

MAPLE

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

# second Maple program:

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

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

      if n<3 then n

      else a(n-1);

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

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

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

           ina(i):= true; i

      fi

    end:

seq(a(n), n=1..70);  # Alois P. Heinz, Feb 07 2011

MATHEMATICA

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 *)

CROSSREFS

Cf. A109853, A308301 (inverse).

Sequence in context: A339361 A166310 A293030 * A083197 A235262 A245704

Adjacent sequences:  A109849 A109850 A109851 * A109853 A109854 A109855

KEYWORD

nonn,look

AUTHOR

Amarnath Murthy, Jul 07 2005

EXTENSIONS

More terms from R. J. Mathar, Mar 27 2006

Edited and extended by Robert G. Wilson v, Jun 14 2006

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 December 5 08:36 EST 2021. Contains 349543 sequences. (Running on oeis4.)