login
a(0)=1, a(1)=2; a(2n) = 2*a(2n-1)+1; a(2n+1) = a(2n) + x, where x is the least number not yet the difference of two terms.
0

%I #16 Oct 19 2017 03:14:44

%S 1,2,5,7,15,22,45,54,109,120,241,253,507,523,1047,1065,2131,2150,4301,

%T 4323,8647,8671,17343,17368,34737,34763,69527,69554,139109,139137,

%U 278275,278304,556609,556640,1113281,1113314,2226629,2226663,4453327

%N a(0)=1, a(1)=2; a(2n) = 2*a(2n-1)+1; a(2n+1) = a(2n) + x, where x is the least number not yet the difference of two terms.

%C Each positive integer can be represented exactly once as the difference of two terms.

%H Paul Erdõs, <a href="http://www.jstor.org/stable/2323102">Problem E3202</a>, American Mathematical Monthly, 94(1987), 372. [_N. Sato_, Oct 14 2008]

%e a(4) = 2*a(3)+1 = 15,

%e a(5) = a(4)+7 = 22 because 7 is not yet a difference.

%K easy,nonn

%O 0,2

%A Holger Stephan (stephan(AT)wias-berlin.de), Nov 04 2005

%E Edited by _Don Reble_, May 16 2006

%E Definition corrected by _Guy P. Srinivasan_, Dec 11 2006