I have one sequence, which is defined like this:
4,7,10,12,15,17,20,22,24
I also found it at OEIS.
And there they have a formula, which I can use to find minimal number of matches to complete squares:
2*n+ceil(2*sqrt(n))
It works fine. But I have no clue how to come from this sequence to formula. Is there any obvious steps which one should attempt?
I also had an assumption that if we are building squares in 1D formula is:
3*n+1
For to 2D I thought formula should be related to squaring somehow(square root is related to squaring but it was not what I expected) and for 3D - cubing. Looks I'm wrong.
Well, it helps to see/know the first differences are either 2 or 3, presuming that continues. That allows one to obtain the "2n" portion requiring an yet-to-be determined subsequent adjustment. This presumes n=1,2,3 ... where we can see using 3n for n=6 exceeds 17, giving us 2n. So our baseline is 2,4,6,8,10,12,14,16,18. We need to map these base values to your 4,7,10,12,15,17,20,22,24. A quick glimpse of the discrepancies vs n chart shows it increases with n, but is not strictly monotonic. Additionally, the numerical discrepancy is seen to include both above and below n, so if it is a function of n, it is reductive (like a root or log). From the image you can then see how one might play around in a spreadsheet. Here we see col D=col G for the limited dataset.