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

A181569
Greatest common divisor of n! and n+1.
4
1, 1, 2, 1, 6, 1, 8, 9, 10, 1, 12, 1, 14, 15, 16, 1, 18, 1, 20, 21, 22, 1, 24, 25, 26, 27, 28, 1, 30, 1, 32, 33, 34, 35, 36, 1, 38, 39, 40, 1, 42, 1, 44, 45, 46, 1, 48, 49, 50, 51, 52, 1, 54, 55, 56, 57, 58, 1, 60, 1, 62, 63, 64, 65, 66, 1, 68, 69, 70, 1, 72, 1, 74, 75, 76, 77, 78, 1
OFFSET
1,3
COMMENTS
From Wilson's theorem, it follows that a(n) = 1 when n + 1 is prime, a(n) > 1 otherwise. - Alonso del Arte, Feb 25 2014
LINKS
FORMULA
a(n) = A050873(A000142(n), n + 1);
a(A006093(n)) = 1;
for n > 3: a(n) = (n + 1) / (n*A010051(n+1) + 1).
a(n) = (n+1)/A014973(n+1). - Michel Marcus, Aug 14 2015
EXAMPLE
a(6) = 1 because 6! and 7 are coprime.
a(7) = 8 because 7! = 5040 and gcd(5040, 8) = 8.
a(8) = 9 because 8! = 40320 and gcd(40320, 9) = 9.
MAPLE
A181569:=n->gcd(n!, n+1): seq(A181569(n), n=1..100); # Wesley Ivan Hurt, Aug 13 2015
MATHEMATICA
Table[GCD[n!, n + 1], {n, 80}] (* Alonso del Arte, Feb 25 2014 *)
PROG
(Magma) [GCD(Factorial(n), n+1): n in [1..80]]; // Vincenzo Librandi, Mar 03 2014
(PARI) a(n)= n!/denominator(polcoeff((x+1)*exp(x+x*O(x^n)), n)); \\ Gerry Martens, Aug 12 2015
(PARI) A181569(n)=gcd(n!, n+1) \\ M. F. Hasler, Aug 16 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reinhard Zumkeller, Oct 31 2010
STATUS
approved