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.

Showing 1-3 of 3 results.

A212310 a(n) = n! mod 4^n.

Original entry on oeis.org

0, 1, 2, 6, 24, 120, 720, 5040, 40320, 100736, 483072, 2168064, 9239552, 53005312, 205203456, 930568192, 2004189184, 12596379648, 54936141824, 81714020352, 534768779264, 1334539714560, 2971594653696, 68346677035008, 232945365286912, 1038559528091648, 2232749779845120
Offset: 0

Views

Author

Alex Ratushnyak, Oct 24 2013

Keywords

Crossrefs

Programs

  • PARI
    a(n) = n! % 4^n; \\ Michel Marcus, Jan 22 2021
  • Python
    import math
    print([math.factorial(n)%(4**n) for n in range(99)])
    

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)

A228448 a(n) = floor(n!/3^n).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 2, 6, 18, 61, 225, 901, 3905, 18226, 91134, 486048, 2754274, 16525645, 104662422, 697749481, 4884246371, 35817806721, 274603184861, 2196825478892, 18306878990770, 158659617920008, 1427936561280078, 13327407905280733, 128831609751047086
Offset: 0

Views

Author

Alex Ratushnyak, Oct 27 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[n!/3^n],{n,0,30}] (* Harvey P. Dale, May 24 2018 *)
  • Python
    import math
    for n in range(99): print(math.factorial(n)//(3**n), end=', ')
Showing 1-3 of 3 results.