%I #39 Apr 28 2021 02:03:07
%S 2,6,8,24,24,120,16,720,48,666,5040,128,954,40320,384,8586,100736,
%T 362880,768,26811,483072,3628800,1280,58725,2168064,39916800,3072,
%U 173259,9239552,234860975,479001600
%N Triangle T(n,k), n>=2, 2 <= k <= A214046(n), read by rows, where T(n,k) = n! mod k^n.
%H Seiichi Manyama, <a href="/A340810/b340810.txt">Rows n = 2..200, flattened</a>
%e n\k | 2 3 4 5 6
%e -----+---------------------------------------------
%e 2 | 2;
%e 3 | 6;
%e 4 | 8, 24;
%e 5 | 24, 120;
%e 6 | 16, 720;
%e 7 | 48, 666, 5040;
%e 8 | 128, 954, 40320;
%e 9 | 384, 8586, 100736, 362880;
%e 10 | 768, 26811, 483072, 3628800;
%e 11 | 1280, 58725, 2168064, 39916800;
%e 12 | 3072, 173259, 9239552, 234860975, 479001600;
%t row[n_] := Module[{k = 1, s = {}}, While[k^n <= n!, k++; AppendTo[s, Mod[n!, k^n]]]; s]; Table[row[n], {n, 2, 12}] // Flatten (* _Amiram Eldar_, Apr 28 2021 *)
%o (Ruby)
%o def f(n)
%o return 1 if n < 2
%o (1..n).inject(:*)
%o end
%o def A(n)
%o m = f(n)
%o ary = []
%o (2..n).each{|i|
%o j = i ** n
%o ary << m % j
%o break if m <= j
%o }
%o ary
%o end
%o def A340810(n)
%o (2..n).map{|i| A(i)}.flatten
%o end
%o p A340810(12)
%Y Column k=2..4 give A068496, A212309, A212310.
%Y Cf. A000142, A074184, A214046.
%K nonn,tabf
%O 2,1
%A _Seiichi Manyama_, Jan 22 2021
|