login
A049413
Largest prime dividing Sum_{k=0..n} k! * (n-k)!.
1
2, 5, 2, 2, 13, 151, 3, 83, 73, 1433, 647, 29, 28211, 337, 19, 73, 18181, 130349, 771079, 731957, 6619, 4111, 61927, 140001721, 42829, 774885169, 745984697, 41711914513, 34311919, 117695654963, 1139908799, 2390249, 54413, 4707207067, 129164452987, 12496027
OFFSET
1,1
COMMENTS
Sum_{k=0..n} k! * (n-k)! = (n+1)! * Sum_{k=0..n} 1 / ((k+1) * 2^(n-k)).
LINKS
Sean A. Irvine, Table of n, a(n) for n = 1..315 (terms 1..167 from Robert Israel)
EXAMPLE
a(5)=13 because Sum_{k=0..5} k! * (5-k)! = 312 = 2^3*3*13.
MAPLE
for n from 1 to 33 do s := 0:for k from 0 to n do s := s+k!*(n-k)!:od: ifactor(s); od;
MATHEMATICA
Table[FactorInteger[Sum[k!(n-k)!, {k, 0, n}]][[-1, 1]], {n, 40}] (* Harvey P. Dale, May 23 2015 *)
PROG
(PARI) a(n) = my(f = factor(sum(k=0, n, k!*(n-k)!))); f[#f~, 1]; \\ Michel Marcus, May 18 2014
(Python)
from sympy import factorial as f, primefactors
def a(n): return max(primefactors(sum(f(k)*f(n-k) for k in range(n+1))))
print([a(n) for n in range(1, 37)]) # Michael S. Branicky, Jul 31 2021
CROSSREFS
Sequence in context: A273990 A216022 A100955 * A300691 A102707 A134486
KEYWORD
nonn
AUTHOR
EXTENSIONS
More terms from Andrew Gacek (andrew(AT)dgi.net), Apr 21 2000
Corrected by Jud McCranie, Jan 03 2001
a(34)-a(36) from Michel Marcus, May 18 2014
STATUS
approved