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-6 of 6 results.

A070035 Exponents of 2 when A068496(n) is also a power of 2.

Original entry on oeis.org

0, 1, 3, 4, 7, 15, 16, 18, 18, 23, 31, 32, 34, 35, 38, 39, 41, 49, 63, 64, 66, 70, 70, 74, 78, 85, 88, 97, 101, 104, 112, 127, 128, 130, 134, 134, 137, 142, 142, 143, 146, 153, 158, 173, 173, 180, 183, 198, 200, 205, 205, 228, 239, 255, 256, 258, 262, 262, 265, 270
Offset: 1

Views

Author

Labos Elemer, Apr 17 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Do[s=Mod[n!, 2^n]; If[IntegerQ[Log[2, s]], Print[Log[2, s]]], {n, 1, 1000}]

Formula

a(n)=Log[2, A068496(A070034(n))].

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)])
    

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)])
    

A070034 Numbers n such that n! reduced modulo 2^n is also a power of 2.

Original entry on oeis.org

1, 2, 4, 6, 8, 16, 19, 20, 21, 27, 32, 35, 36, 39, 40, 42, 44, 52, 64, 67, 68, 72, 73, 79, 80, 88, 92, 101, 104, 109, 116, 128, 131, 132, 136, 137, 141, 144, 145, 146, 150, 159, 160, 176, 177, 185, 188, 202, 204, 208, 209, 233, 244, 256, 259, 260, 264, 265
Offset: 1

Views

Author

Labos Elemer, Apr 17 2002

Keywords

Examples

			Not rarely,consecutive integers are in the sequence like {19,20,21}, providing residues {65536,262144,262144}.
		

Crossrefs

Programs

  • Mathematica
    t = {}; Do[s=Mod[n!, 2^n]; If[IntegerQ[Log[2, s]], AppendTo[t, n]], {n, 300}]; t
    Select[Range[300],IntegerQ[Log2[Mod[#!,2^#]]]&] (* Harvey P. Dale, Aug 04 2021 *)

Formula

Mod[a(n)!, 2^a(n)] = A068496(n) = 2^w for some integer w.

A070036 a(n)=A070034(n)-A070035(n).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 3, 4, 1, 3, 2, 4, 2, 3, 3, 3, 1, 3, 2, 2, 3, 5, 2, 3, 4, 4, 3, 5, 4, 1, 3, 2, 2, 3, 4, 2, 3, 3, 4, 6, 2, 3, 4, 5, 5, 4, 4, 3, 4, 5, 5, 1, 3, 2, 2, 3, 4, 2, 3, 3, 4, 2, 3, 3, 5, 7, 2, 4, 5, 5, 3, 4, 4, 6, 5, 6, 3, 4, 4, 5, 1, 3, 2, 2, 3, 4, 2, 3, 3, 4, 2, 3, 3, 5, 2, 3, 3, 8, 2, 4, 5, 6, 5
Offset: 1

Views

Author

Labos Elemer, Apr 17 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Do[s=Mod[n!, 2^n]; If[IntegerQ[Log[2, s]], Print[n-Log[2, s]]], {n, 1, 1000}]

Formula

a(n)=A070034(n)-Log[2, A068496(A070034(n))].

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)
Showing 1-6 of 6 results.