OFFSET
0,4
LINKS
G. C. Greubel, Rows n = 0..50 of the triangle, flattened
FORMULA
T(n, k) = (prime(n+1) - prime(k+1))! - (n! - k!).
EXAMPLE
Triangle begins as:
1;
1, 1;
5, 1, 1;
115, 19, -2, 1;
362857, 40297, 698, 6, 1;
39916681, 3628681, 40202, 606, -94, 1;
1307674367281, 87178290481, 479000882, 3628086, 24, -576, 1;
355687428090961, 20922789882961, 87178286162, 478996566, 35304, -4200, -4318, 1;
...
MATHEMATICA
T[n_, k_]:= (Prime[n+1] - Prime[k+1])! - (n! - k!);
Table[T[n, k], {n, 0, 10}, {k, 0, n}]//Flatten
PROG
(Magma) [Factorial(NthPrime(n+1) - NthPrime(k+1)) - Factorial(n) + Factorial(k): k in [0..n], n in [0..10]]; // G. C. Greubel, Dec 01 2021
(Sage) flatten([[factorial(nth_prime(n+1) -nth_prime(k+1)) -factorial(n) +factorial(k) for k in (0..n)] for n in (0..10)]) # G. C. Greubel, Dec 01 2021
CROSSREFS
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Mar 25 2009
EXTENSIONS
Edited by G. C. Greubel, Dec 01 2021
STATUS
approved