login
a(n) = 2*n - A123088(n).
1

%I #2 Mar 30 2012 17:27:49

%S 1,0,0,1,0,1,2,0,0,1,2,3,0,0,0,1,0,1,2,3,4,0,0,0,0,1,0,1,0,1,2,0,0,1,

%T 2,3,4,5,0,0,0,0,0,1,0,1,0,1,0,1,2,0,0,1,2,0,0,1,2,3,0,0,0,1,0,1,2,3,

%U 4,5,6,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,2,0,0,1,2,0,0,1,2,0,0,1,2,3,0,0,0,1,0

%N a(n) = 2*n - A123088(n).

%C For k > 1, apparently the smallest n such that a(n) = k is 2^k + k + 1 (see A005126).

%o (PARI) {m=105;w=vector(2*m);print1(1,",");for(n=2,m,k=n;while(w[k],k--);a=n+k;print1(2*n-a,",");w[a]=1)}

%Y Cf. A123088, A005126.

%K nonn

%O 1,7

%A _Klaus Brockhaus_, Oct 05 2006