OFFSET
1,1
PROG
(PARI) isok(newa, v, n) = {for (k=1, n, if (!issquare(Mod(newa, v[k])), return (0)); ); return (1); }
nextnonsq(n) = my(k=n); while (issquare(k), k++); k;
lista(nn) = {my(v=vector(nn), lasta=2); v[1] = lasta; for (n=2, nn, my(newa = nextnonsq(lasta+1)); while (! isok(newa, v, n-1), newa = nextnonsq(newa+1)); v[n] = newa; lasta = newa; ); v; } \\ Michel Marcus, Sep 25 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved