I am not sure I quite understand the question.
"I want to find the first position where the sequence drops to zero"
From this description and looking at sequence I would select position 8 rather 7 for that location.
seq = {0,0,0,1,2,3,1,0,0,0,4,5,8,0}
I infer that you want non-zero digits followed by a zero and want the location of that zero.
Here is something that is not elegant but works
First@Select[
Flatten@Position[seq, 0] ,
# > First@Flatten@Position[seq, x_ /; x != 0] &
]
(* 8 *)
To break it down
Flatten@Position[seq, 0]
(* {1, 2, 3, 8, 9, 10, 14} *)
gives the zero positions and
Flatten@Position[seq, x_ /; x != 0]
(* {4, 5, 6, 7, 11, 12, 13} *)
gives the non-zero positions, the first of these is position 4.
I want to select from the group of zero positions the location which first exceeds the first non-zero digit (4), which is 8 for this example.
First@Select[
Flatten@Position[seq, 0] ,
# > First@Flatten@Position[seq, x_ /; x != 0] &
]
Length[First[Split[seq, #1 <= #2 || #2 != 0 &]]]
. $\endgroup$