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.

A050137 a(1)=2; a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = 2*n.

This page as a plain text file.
%I A050137 #16 Aug 04 2025 02:19:02
%S A050137 2,1,6,3,10,5,14,7,18,9,4,24,12,28,30,15,34,17,8,40,20,44,22,11,50,25,
%T A050137 54,27,13,60,62,31,66,33,16,72,36,76,38,19,82,41,86,43,21,92,46,23,98,
%U A050137 49,102,51,106,53,26,112,56,116,58,29,122,61
%N A050137 a(1)=2; a(n) = floor(a(n-1)/2) if this is not among 0,a(1),...,a(n-1); otherwise a(n) = 2*n.
%C A050137 Does this sequence contain every positive integer exactly once?
%H A050137 Robert Israel, <a href="/A050137/b050137.txt">Table of n, a(n) for n = 1..10000</a>
%p A050137 R:= 2: S:= {2}: a:= 2:
%p A050137 for n from 2 to 100 do
%p A050137   t:= floor(a/2);
%p A050137   if t <> 0 and not member(t,S) then a:= t else a:= 2*n fi;
%p A050137   R:= R,a; S:= S union {a};
%p A050137 od:
%p A050137 R; # _Robert Israel_, Aug 03 2025
%Y A050137 Cf. A050000, A050004, A050128, A050132, A050135, A050136, A050138, A050196.
%K A050137 nonn,look
%O A050137 1,1
%A A050137 _Clark Kimberling_