# Closed form expression for Number of unique elements in multiple series

Suppose I have 3 series.

Base Series 1: $$x_1,0,x_3,x_4,0,x_6,x_7,0,x_9.....x_n$$ where every $$3d-1^{th}$$ term is $$0$$

Base Series 2: $$y_1,y_2,0,y_4,y_5,y_6,y_7,0,y_9.....y_n$$ where every $$5d-2^{th}$$ term is $$0$$

Derived Series: A termwise product of series 1 and series 2:

$$x_1.y_1,0,0,x_4.y_4,0,x_6.y_6,x_7.y_7,0,x_9.y_9,....,x_n.y_n$$

Is there a closed form expression to find the number of zeros in the derived series? It is basically the sum of the number of zeroes in base series 1 and base series 2 - the common terms i.e. the term 8 is zero in both base series ( the common terms themselves form an Arithmetic progression with $$a=(3*5+1)/2$$ and $$d=15$$). I can do this recursively if I have any number of base series, but I wonder if there is a formula which I can apply to get the result directly?