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.

Original entry on oeis.org

2, 6, 8, 24, 24, 120, 16, 720, 48, 666, 5040, 128, 954, 40320, 384, 8586, 100736, 362880, 768, 26811, 483072, 3628800, 1280, 58725, 2168064, 39916800, 3072, 173259, 9239552, 234860975, 479001600
Offset: 2

Views

Author

Seiichi Manyama, Jan 22 2021

Keywords

Examples

			n\k  |    2       3        4          5          6
-----+---------------------------------------------
   2 |    2;
   3 |    6;
   4 |    8,     24;
   5 |   24,    120;
   6 |   16,    720;
   7 |   48,    666,    5040;
   8 |  128,    954,   40320;
   9 |  384,   8586,  100736,    362880;
  10 |  768,  26811,  483072,   3628800;
  11 | 1280,  58725, 2168064,  39916800;
  12 | 3072, 173259, 9239552, 234860975, 479001600;
		

Crossrefs

Column k=2..4 give A068496, A212309, A212310.

Programs

  • Mathematica
    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 *)
  • Ruby
    def f(n)
      return 1 if n < 2
      (1..n).inject(:*)
    end
    def A(n)
      m = f(n)
      ary = []
      (2..n).each{|i|
        j = i ** n
        ary << m % j
        break if m <= j
      }
      ary
    end
    def A340810(n)
      (2..n).map{|i| A(i)}.flatten
    end
    p A340810(12)