login
A117735
a(n) = n! - primorial(n).
0
0, 0, 0, 0, 18, 90, 690, 4830, 40110, 362670, 3628590, 39914490, 478999290, 6226990770, 87178261170, 1307674337970, 20922789857970, 355687427585490, 6402373705217490, 121645100399132310, 2432902008166940310
OFFSET
0,5
FORMULA
a(0)=0. a(n) = n!-A034386(n) = A000142(n)-A034386(n), n>0.
MATHEMATICA
f[n_] := If[PrimeQ[n] == True, 1, n] cf[0] = 1; cf[n_Integer?Positive] := cf[n] = f[n]*cf[n - 1] g[n_] := If[PrimeQ[n] == True, n, 1] p[0] = 1; p[n_Integer?Positive] := p[n] = g[n]*p[n - 1] Table[n! - p[n], {n, 0, 20}]
CROSSREFS
Sequence in context: A247901 A369419 A059138 * A041624 A374083 A227812
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Apr 14 2006
STATUS
approved