OFFSET
0,5
COMMENTS
a(0) = 1 as an empty product.
LINKS
MATHEMATICA
a[n_] := Module[{k = n, p = 2, s = 1, r}, While[{k, r} = QuotientRemainder[k, p]; k != 0 || r != 0, If[r > 0, s *= r]; p = NextPrime[p]]; s]; Array[a, 100, 0] (* Amiram Eldar, Mar 06 2024 *)
PROG
(PARI) A328581(n) = { my(m=1, p=2); while(n, if(n%p, m *= (n%p)); n = n\p; p = nextprime(1+p)); (m); };
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Antti Karttunen, Oct 21 2019
STATUS
approved