OFFSET
2,1
FORMULA
a(n) seems to be divisible by n. - Ralf Stephan, Sep 01 2003 [This is true and can be easily proven from the formula below and from the multiplicative formula for A000252(n). - Amiram Eldar, Aug 03 2024]
MATHEMATICA
f[p_, e_] := (p - 1)^2*(p + 1)*p^(4*e - 3); a[n_] := n^4 - Times @@ f @@@ FactorInteger[n]; Array[a, 36, 2] (* Amiram Eldar, Aug 03 2024 *)
PROG
(PARI) a(n) = {my(f = factor(n), p = f[, 1], e=f[, 2]); n^4 - prod(k = 1, #p, (p[k] - 1)^2*(p[k] + 1)*p[k]^(4*e[k] - 3)); } \\ Amiram Eldar, Aug 03 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved