Here's what I did: Create the directory "{whatever the path is}\AppData\Local\MiKTeX\tex\latex\asymptote" and copy the .sty and .tex files from Asymptote into it. Update your fndb through the MiKTeX console. Add Asymptote to your PATH. Go to Setting and search for 'environment'. Click below the list of paths, not on one of the paths, before you add it. :) Make sure Asymptote is above MiKTeX in the list of paths in your PATH variable. Asymptote should now be executable within MiKTeX. On 10/13/2022...
Also, possibly i<n rather that i<=n. I don't have time to run your example right now.
No. Your definitons of g, G, and G3 do not depend on n. Neither do f, F, and F3. And why are they the same as the g's? That's not necesary, it seems.
Try taking all the static elements (independent of n) out of your for loop to begin with, and see if that helps.
Maybe we are finally getting down to the issue. http://www.winedt.org/config/menus/Asymptote.html You can compile your Asymptote figures through the command Asymptote in the TeX menu or the corresponding toolbar button or the shortcut Shift+Ctrl+Y. Note that TeXify and PDFTeXify commands are modified by this package so to automatically compile Asymptote figures when needed. You can customize Asymptote parameters through the Execution Modes dialog.
If I run pdftexify from scratch then I get the graphic but not the references and then if I run pdflatex I get the references, graphic, everything. I also have enable-write18 and shell-scape in the switches in the Execution Modes dialog for both.
Thanks. I'll move this issue over to the winedt list.
I'm using currennt miktex and winedt on win 10. It doesn't seem to work with pdflatexify but does work with pdflatex. Could you try pdflatexify?