OFFSET
1,1
EXAMPLE
a(4) = 10! - prime(4)^prime(4) = 3628800 - 823543 = 2805257.
MATHEMATICA
a[n_] := Module[{p = Prime[n]^Prime[n], k = 1}, While[k! < p, k++]; k! - p]; Array[a, 11] (* Amiram Eldar, Mar 12 2022 *)
PROG
(PARI) f(n) = my(p = prime(n)); p^p;
a(n) = my(k=1, P=f(n)); until(k! >= P, k++); k!-P; \\ Michel Marcus, Mar 12 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Ctibor O. Zizka, Apr 06 2008
EXTENSIONS
Corrected and extended by Michel Marcus, Mar 12 2022
STATUS
approved