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.

A212309 a(n) = n! mod 3^n.

Original entry on oeis.org

0, 1, 2, 6, 24, 120, 720, 666, 954, 8586, 26811, 58725, 173259, 1189485, 3898206, 1077462, 17239392, 34789338, 238787595, 275338926, 2019994119, 578463687, 2265847911, 52114501953, 121029900948, 201452158890, 1848601693368, 4158660811014, 2058540433587, 36820880119062
Offset: 0

Views

Author

Alex Ratushnyak, Oct 24 2013

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Mod[n!,3^n],{n,0,30}] (* Harvey P. Dale, Apr 01 2018 *)
  • PARI
    a(n) = n! % 3^n; \\ Michel Marcus, Jan 22 2021
  • Python
    import math
    print([math.factorial(n)%(3**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)

A228449 a(n) = floor(n! / 4^n).

Original entry on oeis.org

1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 9, 28, 92, 324, 1217, 4871, 20703, 93166, 442542, 2212711, 11616735, 63892044, 367379253, 2204275523, 13776722023, 89548693155, 604453678799, 4231175751597, 30676024199079, 230070181493096, 1783043906571497, 14264351252571976
Offset: 0

Views

Author

Alex Ratushnyak, Oct 27 2013

Keywords

Crossrefs

Programs

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