OFFSET
1,4
LINKS
Andrew Howroyd, Table of n, a(n) for n = 1..200
FORMULA
MATHEMATICA
a[n_] := Sum[If[PrimeQ[p], Sum[If[p > 2 || Mod[k, 2] == 0, n!/(k!*(n - k*p)!*p^k)/(p - 1), 0], {k, 1, n/p}], 0], {p, 2, n}];
Array[a, 24] (* Jean-François Alcover, Jul 06 2018, after Andrew Howroyd *)
PROG
(PARI) a(n)={sum(p=2, n, if(isprime(p), sum(k=1, n\p, if(p>2||k%2==0, n!/(k!*(n-k*p)!*p^k)))/(p-1)))}
CROSSREFS
KEYWORD
nonn
AUTHOR
Olivier Gérard, Apr 03 2012
EXTENSIONS
Terms a(9) and beyond from Andrew Howroyd, Jul 04 2018
STATUS
approved