cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

This page as a plain text file.
%I A114183 #60 Jan 26 2014 13:31:00
%S A114183 1,2,4,8,16,32,5,10,3,6,12,24,48,96,9,18,36,72,144,288,576,1152,33,66,
%T A114183 132,11,22,44,88,176,13,26,52,7,14,28,56,112,224,448,21,42,84,168,336,
%U A114183 672,25,50,100,200,400,20,40,80,160,320,17,34,68,136,272,544,23,46,92
%N 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).
%C A114183 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
%C A114183 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.
%C A114183 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
%H A114183 N. J. A. Sloane, <a href="/A114183/b114183.txt">Table of n, a(n) for n = 1..10000</a>
%H A114183 Mark Hennings and the United Kingdom Mathematics Trust, <a href="/A114183/a114183.pdf">Proof that the sequence is a permutation of the natural numbers</a>. An essentially identical proof was contributed by Max Alekseyev.
%H A114183 N. J. A. Sloane, <a href="/A114183/a114183.txt">Table of n, a(n) for n = 1..100000</a>
%H A114183 <a href="/index/Per#IntegerPermutation">Index entries for sequences that are permutations of the natural numbers</a>
%p A114183 See A221715.
%t A114183 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 *)
%o A114183 (Haskell)
%o A114183 a114183 n = a114183_list !! (n-1)
%o A114183 a114183_list = 1 : f [1] where
%o A114183    f xs@(x:_) = y : f (y : xs) where
%o A114183      y = if z `notElem` xs then z else 2 * x where z = a000196 x
%o A114183 -- _Reinhard Zumkeller_, Mar 05 2013
%Y A114183 Cf. A189419 (inverse), A221715, A221716, A000196, A000523, A213218.
%Y A114183 See A222193 and A222194 for records.
%K A114183 nonn,look
%O A114183 1,2
%A A114183 _Franklin T. Adams-Watters_, Feb 04 2006
%E A114183 Missing negative in definition inserted by _D. S. McNeil_, May 26 2010
%E A114183 Entry revised by _N. J. A. Sloane_, Mar 01 2013