A293246 a(n) is the smallest k > 1 such that A000166(k) is divisible by n!.
2, 2, 3, 7, 25, 121, 241, 1681, 13441, 40321, 403201, 2016001, 3225601, 41932801, 609638401
Offset: 0
Examples
a(3) = 7 because the smallest nonzero subfactorial number that is divisible by 3! is A000166(7) = 1854.
Programs
-
Maple
f:= proc(n) local k, t, p; p:= n!; t:= 0; for k from 2 do t:= k*t + (-1)^k mod p; if t = 0 then return k fi od: end proc: seq(f(n),n=0..13); # Robert Israel, Oct 03 2017
Extensions
a(8)-a(14) from Robert Israel, Oct 03 2017
Comments