%I #24 Mar 04 2023 08:56:19
%S 5,14,17,19,22,31,33,36,38,47,50,52,55,64,67,70,79,82,84,87,96,98,101,
%T 103,112,115,117,120,131,132,143,146,148,151,160,162,165,167,176,179,
%U 181,184,193,196,199,208,211,213,216,225,227,230,232,241,244,246,249,258,260,262,271,274,276,279,288,290,293,295
%N Numbers of the form k + wt(k) for exactly two distinct k, where wt(k) = A000120(k) is the binary weight of k.
%C The positions of entries equal to 2 in A228085, or numbers that appear exactly twice in A092391.
%C Numbers that can be expressed as the sum of distinct terms of the form 2^n+1, n=0,1,... in exactly two ways.
%H Reinhard Zumkeller, <a href="/A230091/b230091.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Coi#Colombian">Index entries for Colombian or self numbers and related sequences</a>
%e 5 = 3 + 2 = 4 + 1, so 5 is in this list.
%p # Maple code for A000120, A092391, A228085, A010061, A228088, A230091, A230092
%p with(LinearAlgebra):
%p read transforms;
%p wt := proc(n) local w, m, i; w := 0; m := n; while m > 0 do i := m mod 2; w := w+i; m := (m-i)/2; od; w; end: # A000120
%p M:=1000;
%p lis1:=Array(0..M);
%p lis2:=Array(0..M);
%p ctmax:=4;
%p for i from 0 to ctmax do ct[i]:=Array(0..M); od:
%p for n from 0 to M do
%p m:=n+wt(n);
%p lis1[n]:=m;
%p if (m <= M) then lis2[m]:=lis2[m]+1; fi;
%p od:
%p t1:=[seq(lis1[i],i=0..M)]; # A092391
%p t2:=[seq(lis2[i],i=0..M)]; # A228085
%p COMPl(t1); # A010061
%p for i from 1 to M do h:=lis2[i];
%p if h <= ctmax then ct[h]:=[op(ct[h]),i]; fi; od:
%p len:=nops(ct[0]); [seq(ct[0][i],i=1..len)]; # A010061 again
%p len:=nops(ct[1]); [seq(ct[1][i],i=1..len)]; # A228088
%p len:=nops(ct[2]); [seq(ct[2][i],i=1..len)]; # A230091
%p len:=nops(ct[3]); [seq(ct[3][i],i=1..len)]; # A230092
%t nt = 100; (* number of terms to produce *)
%t S[kmax_] := S[kmax] = Table[k + Total[IntegerDigits[k, 2]], {k, 0, kmax}] // Tally // Select[#, #[[2]] == 2&][[All, 1]]& // PadRight[#, nt]&;
%t S[nt];
%t S[kmax = 2 nt];
%t While[S[kmax] =!= S[kmax/2], kmax *= 2];
%t S[kmax] (* _Jean-François Alcover_, Mar 04 2023 *)
%o (Haskell)
%o a230091 n = a230091_list !! (n-1)
%o a230091_list = filter ((== 2) . a228085) [1..]
%o -- _Reinhard Zumkeller_, Oct 13 2013
%Y Cf. A000120, A010061, A092391, A228088, A228085, A230058, A230092.
%Y Cf. A227915.
%K nonn,base
%O 1,1
%A _N. J. A. Sloane_, Oct 10 2013