login
A114183
a(1) = 1; for n>1, a(n) = floor(sqrt(a(n-1))) if that number is not already in the sequence, otherwise a(n) = 2a(n-1).
21
1, 2, 4, 8, 16, 32, 5, 10, 3, 6, 12, 24, 48, 96, 9, 18, 36, 72, 144, 288, 576, 1152, 33, 66, 132, 11, 22, 44, 88, 176, 13, 26, 52, 7, 14, 28, 56, 112, 224, 448, 21, 42, 84, 168, 336, 672, 25, 50, 100, 200, 400, 20, 40, 80, 160, 320, 17, 34, 68, 136, 272, 544, 23, 46, 92
OFFSET
1,2
COMMENTS
One can prove by induction that n must appear in the sequence after [n/2], showing that the sequence is one-to-one; and that frac(log_2(log_2(a(n))) is dense in [0,1), from which it follows that a(n) is onto. - From Franklin T. Adams-Watters, Feb 04 2006
Comment from N. J. A. Sloane, Mar 01 2013: Although the preceding argument seems somewhat incomplete, the result is certainly true: This sequence is a permutation of the natural numbers. Mark Hennings and the United Kingdom Mathematics Trust, and (independently) Max Alekseyev, sent detailed proofs - see the link below.
The sequence consists of a series of "doubling runs", and the starting points and lengths of these runs are in A221715 and A221716 respectively. - N. J. A. Sloane, Jan 27 2013
LINKS
Mark Hennings and the United Kingdom Mathematics Trust, Proof that the sequence is a permutation of the natural numbers. An essentially identical proof was contributed by Max Alekseyev.
MAPLE
See A221715.
MATHEMATICA
a[1] = 1; a[n_] := a[n] = With[{an = Floor[Sqrt[a[n-1]]]}, If[FreeQ[Array[a, n-1], an], an, 2*a[n-1]]]; Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Apr 23 2013 *)
PROG
(Haskell)
a114183 n = a114183_list !! (n-1)
a114183_list = 1 : f [1] where
f xs@(x:_) = y : f (y : xs) where
y = if z `notElem` xs then z else 2 * x where z = a000196 x
-- Reinhard Zumkeller, Mar 05 2013
CROSSREFS
See A222193 and A222194 for records.
Sequence in context: A036130 A335836 A122169 * A036129 A319303 A088976
KEYWORD
nonn,look
AUTHOR
EXTENSIONS
Missing negative in definition inserted by D. S. McNeil, May 26 2010
Entry revised by N. J. A. Sloane, Mar 01 2013
STATUS
approved