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”).

A261809
a(n) = n! - prime(n).
2
-1, -1, 1, 17, 109, 707, 5023, 40301, 362857, 3628771, 39916769, 479001563, 6227020759, 87178291157, 1307674367953, 20922789887947, 355687428095941, 6402373705727939, 121645100408831933, 2432902008176639929, 51090942171709439927, 1124000727777607679921
OFFSET
1,4
LINKS
FORMULA
a(n) = A000142(n) - A000040(n).
EXAMPLE
For n=4, a(4) = 4! - prime(4) = 24 - 7 = 17.
MATHEMATICA
Table[n! - Prime[n], {n, 1, 150}] (* G. C. Greubel, Sep 01 2015 *)
PROG
(PARI) vector(50, n, n!-prime(n))
(Magma) [Factorial(n)-NthPrime(n): n in [1..30]]; // Vincenzo Librandi, Sep 02 2015
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Altug Alkan, Sep 01 2015
STATUS
approved