OFFSET
1,4
COMMENTS
a(n)=0 iff n is prime.
LINKS
Paolo P. Lava, Table of n, a(n) for n = 1..10000
EXAMPLE
a(18) = a(2*3*3) = (18-2)*(18-3)*(18-3) = 16*15*15 = 3600.
MATHEMATICA
Join[{1}, Table[Times@@(n-#&/@Flatten[Table[#[[1]], #[[2]]]&/@FactorInteger[ n]]), {n, 2, 50}]] (* Harvey P. Dale, Dec 04 2018 *)
PROG
(PARI) a(n) = {my(f = factor(n)); for (k=1, #f~, f[k, 1] = n - f[k, 1]; ); factorback(f); } \\ Michel Marcus, Mar 22 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Jul 02 2002
STATUS
approved