A306772 a(n) is the least number k such that k! is divisible by (k+1)^n but not by (k+1)^(n+1).
1, 5, 14, 17, 11, 31, 23, 35, 39, 44, 47, 99, 83, 59, 153, 164, 71, 95, 79, 125, 89, 134, 285, 199, 311, 263, 167, 119, 296, 188, 159, 329, 543, 209, 143, 223, 299, 384, 395, 323, 251, 679, 349, 179, 279, 747, 571, 485, 399, 404, 314, 527, 319, 335, 449, 511, 287, 239, 714
Offset: 0
Keywords
Examples
For n = 1, 1! = 1 is not divisible by 2, 2! = 2 is not divisible by 3, 3! = 6 is not divisible by 4, 4! = 24 is not divisible by 5, and 5! = 120 is divisible by 6 but not 36. Therefore a(1) = 5. - _Michael B. Porter_, Apr 21 2019
Programs
-
Mathematica
Array[Block[{k = 1}, While[Nand[Mod[k!, (k + 1)^#] == 0, Mod[k!, (k + 1)^(# + 1)] != 0], k++]; k] &, 58] (* Michael De Vlieger, Mar 11 2019 *)
-
PARI
a(n) = {my(k=1); while((k! % (k+1)^n) || !(k! % (k+1)^(n+1)), k++); k; }
Comments