MathDemos:historical prime factor hpf(n)

Visit for the latest revision of A365521 in OEIS.

historical prime factor, hpf(n): is defined as the prime factor of $n$ that has not appeared for the longest time in ${hpf(1),..., hpf(n-2),hpf(n-1)}$. hpf(1)=1

hpf(n) selects the most recently unoccurring prime factor of $n$. For example,
hpf(6)=3, because hpf(4)=2;hpf(12)=2, because hpf(9)=3, hpf(8)=2, here 2 is more historical than 3; hpf(30)=2, because recently hpf(27)=3, hpf(25)=5.

Note: hpf(120)=hpf(125)=5, 113..127

Q:when Prime[i]< m < n < Prime[i+1] and hpf(m)==hpf(n)?