login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A158748
Triangle, read by rows, T(n, k) = (prime(n+1) - prime(k+1))! - (n! - k!).
1
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
OFFSET
0,4
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
Sequence in context: A173475 A174919 A156952 * A351241 A273874 A086039
KEYWORD
sign,tabl
AUTHOR
Roger L. Bagula, Mar 25 2009
EXTENSIONS
Edited by G. C. Greubel, Dec 01 2021
STATUS
approved