Properties of a sequence generated by a function Suppose $\mathcal{B} = \{a_1, a_2, a_3, \ldots\}$ is a sequence of integers generated by some function $\mathcal{D}$ such that we have
$$\prod_{i = 1}^{k}a_i \quad \text{always divides}\quad\prod_{i = n - k + 1}^{n}a_i$$
for every positive integer $k$. Note that here $n$ is greater than or equal to $k$. Let us call this property of the sequence as product property. What can be function $\mathcal{D}$ in general which will generate the sequence satisfying the product property? Are there any conditions on sequence $\mathcal{B} = \{a_1, a_2, a_3, \ldots\}$ which implies that the product property is satisfied? For example if we say function $\mathcal{D}$ that generates the sequence is $n^2$ that is we have $\mathcal{B} = \{1,4,9,16,25 \ldots\}$ then it's easy to see that it satisfies the property that is
$$\prod_{i = 1}^{k}i^2 \quad \text{always divides}\quad\prod_{i = n - k + 1}^{n}i^2$$
for every positive integer $k$. Similarly if we say function $\mathcal{D}$ that generates the sequence is $n(n + 1)$ then also it satisfies the product property that is we have
$$\prod_{i = 1}^{k}i(i + 1) \quad \text{always divides}\quad\prod_{i = n - k + 1}^{n}i(i + 1)$$
My main question is Are there any conditions on sequence $\mathcal{B} = \{a_1, a_2, a_3, \ldots\}$ which implies that the product property is satisfied? Are there any conditions on sequence $\mathcal{B} = \{a_1, a_2, a_3, \ldots\}$ which implies that the product property is not satisfied? What are some more example of the sequence $\mathcal{B}$ which satisfy the product property?
I have worked on this problem for a very long time but didn't succeed to get any strong conditions. However I have found many example of the sequence $\mathcal{B}$ which satisfy the product property. I have generated these sequences from some trial and error method, however I am struggling with the conditions part which would imply if the the sequence satisfies the product property or not. Any help or hint would be highly appreciated, Thanks.
 A: For any $a$, let $p_a$ denote the $a$th prime.  Define $e_a(n)$ to be the largest power of $p_a$ that divides $\mathcal{D}(n)$; that is, $$\mathcal{B}=\left\{\prod_{a=1}^{\infty}{p_a^{e_a(n)}}\right\}_n$$  (The product is finite because only finitely-many $e_a$ are nonzero.)
I do not know a simple necessary condition (but see equation (1) below).  A sufficient condition is that $e_a$ is nondecreasing, which holds for all your examples:

*

*if $\mathcal{D}(i)=i^2$, then $e_a(i)=\left\lfloor2\log_{p_a}(i)\right\rfloor$;

*if $\mathcal{D}(i)=i(i+1)$, then $e_a(i)=\left\lfloor\log_{p_a}(i(i+1))\right\rfloor$.

It is also satisfied by more exotic examples, like

*

*$\mathcal{B}=\{2,4,8,16,\dots\}$ and

*$\mathcal{B}=\{1,1,1,1,\dots\}$.

It is not satisfied by the following examples:

*

*$\mathcal{B}=\{1,2,1,2,1,2,1,2,\dots\}$

*$\mathcal{B}=\{1,2,1,2,3,4,5,6,\dots\}$
These results were not obtained from any deep insight, just some slight notational convenience, described below.
Your condition is equivalent to the following: for any $a\geq1$ and $n\geq k\geq1$, $$\sum_{j=n-k+1}^n{e_a(j)}\geq\sum_{j=1}^k{e_a(j)}$$  To see this, just note that if $x$ divides $y$, then any prime power dividing $x$ must also divide $y$.  The left-hand term is the exponent of $p_a$ dividing $\prod_{j=n-k+1}^n{\mathcal{D}(j)}$; the right-hand term is the exponent of $p_a$ dividing $\prod_{j=1}^k{\mathcal{D}(j)}$.
Now change variables to $x=n-k$; then we want, for any $a\geq1$ and $x,k\geq1$, $$\sum_{j=1}^k{e_a(j+x)}\geq\sum_{j=1}^k{e_a(j)}\quad\quad(1)$$  It is now immediate why $e_a$ increasing suffices: then $e_a(j+x)\geq e_a(j)$, and we can bound the sums termwise.
A: For each prime, $p$ let
$$
v_p(n)=\# \text{times $p$ occurs in the prime decomposition of $a_1\times \dots \times a_n$}
$$
In order to for $a_1\dots a_k$ to divide $a_{n-k+1}\cdots a_n$, it must be the case that there are at least as many copies of $p$ in the former as in the latter. Since the number of copies of $p$ in the former is $v_p(n)-v_p(n-k)$. Therefore, it needs to be true that
$$
v_p(n)\ge v_p(k)+v_p(n-k)
$$
An equivalent way of saying this is
$$
v_p(n+m)\ge v_p(n)+v_p(m)\tag{$*$}
$$
A sequence $v_p(1),v_2(2),\dots$ which satisfies $(*)$ is called super-additive. We just argued that this condition is necessary, for each $p$. It is also sufficient; as long as $(*)$ holds for all primes, the ratio will be an integer. Furthermore, the sequences $v_p(n)$ uniquely determine the prime decompositions of each $a_n$ (up to a sign). The only constraint between the sequences is that for each $n$, there can only be finitely many $p$ for which $v_p(n)$ is nonzero.
We have the following complete characterization of sequences with the divisibility property:

The sequence $(a_1,a_2,\dots)$ satisfies the divisibility property if and only if for each prime $p$, $(v_p(1),v_p(2),\dots)$ is super-additive.
A collection of super-additive sequences $(v_p(1),v_p(n),\dots)$ determines a corresponding valid sequence $(a_1,a_2,\dots)$ if and only if for each natural number $n$, there are a finite number of primes $p$ for which $v_p(n)\neq 0$.

There is a lot of freedom here, and there is no real easy way to characterize all super-additive sequences. For some more examples, and a reference to a Knuth paper with more information, see this answer of mine: Properties of sequence
