OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..680
FORMULA
MAPLE
a:= proc(n) option remember; `if`(n=0, 1,
a(n-1)*`if`(issqrfree(n), n, 1))
end:
seq(a(n), n=0..27); # Alois P. Heinz, Sep 20 2021
MATHEMATICA
With[{sfnos=Select[Range[50], SquareFreeQ]}, Table[Times@@Select[sfnos, #<n+1&], {n, 0, 30}]] (* Harvey P. Dale, Jun 13 2011 *)
PROG
(PARI) a(n) = prod(k=1, n, if (issquarefree(k), k, 1)); \\ Michel Marcus, Sep 20 2021
(PARI) a(n) = my(p=1); forsquarefree(x=1, n, p*=x[1]); p; \\ Michel Marcus, Sep 20 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 05 2010
EXTENSIONS
Definition corrected by Harvey P. Dale, Jun 13 2011
STATUS
approved