%I #16 Jul 20 2022 22:37:34
%S 0,0,0,1,0,1,0,2,0,2,0,2,2,2,1,2,1,9,0,2,2,4,0,8,0,4,0,2,1,2,7,0,2,2,
%T 3,0,5,0,4,4,13,0,2,1,12,0,4,1,15,0,4,7,0,4,4,3,0,3,21,0,4,1,4,6,0,3,
%U 2,9,0,5,0,4,2,24,0,2,6,0,4,9,50,0,3,8,0,4,7,21,0,3,17
%N The difference between the indices of the two most recent instances of a(n-1), not including a(n-1) itself, or 0 if not enough such instances exist.
%C This is similar to Van Eck's sequence: A181391.
%e Say you have 0, 0, 0, 1, 0, 1, 0, 2, 0, 2, 0, 2, 2, ?
%e The previous term is a 2, and the distance between the pair of most recent 2s before that is 2, hence ? = 2.
%Y Cf. A181391.
%K nonn
%O 1,8
%A _Eric Fox_, Jul 19 2022