cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A340810 Triangle T(n,k), n>=2, 2 <= k <= A214046(n), read by rows, where T(n,k) = n! mod k^n.

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