login
Term in Recamán's sequence A005132 where n appears for the last time, or -1 if n never appears.
0

%I #9 Sep 06 2022 15:31:20

%S 0,1,4,2,131,129,3,5,16,14,12,10,8,6,31,29,27,25,23,99734,7,9,11,13,

%T 15,17,64,62,60,58,56,54,52,50,48,46,44,42,40,38,111,22,24,26,28,30,

%U 32,222,220,218,216,214,212,210,208,206,204,202,200,198,196,181653

%N Term in Recamán's sequence A005132 where n appears for the last time, or -1 if n never appears.

%C Same sequence as A057167 until a(42) = 24.

%C Let k be the largest member of A057167 before A057167(n). Trivially, if A057167(n) > k, a(n) = A057167(n).

%C If every nonnegative integer appears in A005132, then -1 does not appear in this sequence.

%Y Cf. A005132, A057167.

%K nonn

%O 0,3

%A _Iain Fox_, Jul 11 2022