Let $F_n$ denote the $n$-th Fibonacci number. I am interested in the sequence $$a(k, n)=\left | \left \{0 \leq m \leq n: \frac{F_m}{k} \; \text{is a perfect square} \right \} \right |,$$ where $|\cdot|$ denotes the cardinality of a set.
For example, $a(1, 100) = 4$ since there are only four perfect squares among the first $n=100$ Fibonnaci numbers: $F_0=0$, $F_1=1$, $F_2=1$ and $F_{12}=144$.
How can I write a code to calculate $a(k, n)$?

perfect square? – cvgmt Jun 24 '23 at 11:17Perfect triangle numbersetc. but I do not knowPerfect square. – cvgmt Jun 25 '23 at 00:14