Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #27 Mar 01 2023 14:42:52
%S 1,2,3,1,2,4,5,6,7,3,8,9,4,10,11,12,13,5,6,14,15,16,17,7,18,19,8,20,
%T 21,22,23,9,10,24,25,26,27,11,12,28,29,30,31,13,32,33,14,34,35,36,37,
%U 15,16,38,39,40,41,17,42,43,18,44,45,46,47,19,20,48,49,50
%N The integers of the sequence appear exactly twice. Between the two copies of k there are k odd integers. The sequence is always extended with the smallest integer not leading to a contradiction.
%e There is one odd integer between the two 1s: this is the integer 3;
%e there are two odd integers between the two 2s: they are 3 and 1;
%e there are three odd integers between the two 3s: they are 1, 5 and 7; etc.
%t lst={1};k=2;
%t Do[While[FreeQ[lst,k]&&Count[lst[[First@@Position[lst,t]+1;;]],a_/;OddQ@a]!=t,AppendTo[lst,k];k++];lst=AppendTo[lst,t],{t,25}];lst (* _Giorgos Kalogeropoulos_, Feb 28 2023 *)
%Y Cf. A132291.
%K nonn
%O 1,2
%A _Eric Angelini_, Feb 12 2023
%E More terms from _Jinyuan Wang_, Feb 14 2023