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

A333710 Number of permutations sigma of [n] such that i! divides Product_{k=1..i} sigma(k) for 1 <= i <= n.

Original entry on oeis.org

1, 1, 2, 4, 14, 28, 212, 424, 3060, 13488, 131212, 262424, 6444376, 12888752, 145241952, 2146993212, 40313750564, 80627501128, 2265599072684, 4531198145368, 173216179971224, 3202520631881824, 42018513097187068, 84037026194374136, 7051753589203676704, 50056536119264986708
Offset: 0

Views

Author

Seiichi Manyama, Apr 09 2020

Keywords

Examples

			a(4) = 14: 1234, 1432, 2134, 2314, 2341, 2431, 3214, 3241, 3412, 3421, 4132, 4231, 4312, 4321.
a(5) = 28: 12345, 14325, 21345, 23145, 23415, 23451, 23541, 24315, 24351, 25341, 32145, 32415, 32451, 32541, 34125, 34215, 34251, 34521, 41325, 42315, 42351, 43125, 43215, 43251, 43521, 45321, 52341, 54321.
		

Crossrefs

Programs

  • Maple
    b:= proc(s, p) option remember; (n-> `if`(n=0, 1, add(`if`(
          irem(p*n, j, 'q')=0, b(s minus {j}, q), 0), j=s)))(nops(s))
        end:
    a:= n-> b({$1..n}, 1):
    seq(a(n), n=0..17);  # Alois P. Heinz, Apr 09 2020
  • Mathematica
    b[s_, p_] := b[s, p] = Module[{n=Length[s], q, r}, If[n==0, 1, Sum[If[{q, r} = QuotientRemainder[p n, j]; r==0, b[s~Complement~{j}, q], 0], {j, s}]]];
    a[n_] := a[n] = If[n>2 && PrimeQ[n], 2 a[n-1], b[Range[n], 1]];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 25}] (* Jean-François Alcover, Nov 16 2020, after Alois P. Heinz *)
  • PARI
    {a(n) = if(n==0, 1, my(k=0); forperm([1..n], p, if(#Set(vector(n, i, prod(j=1, i, p[j])%i!))==1, k++)); k)}

Formula

a(p) = 2*a(p-1) if p is prime.

Extensions

a(14)-a(25) from Alois P. Heinz, Apr 09 2020

A333934 Number of permutations of [n] such that the product of the first k elements and the product of the last k elements are multiples of k for all k in [n].

Original entry on oeis.org

1, 1, 2, 2, 8, 8, 132, 272, 1844, 7824, 219392, 879040, 9865488, 30363264, 1348905760, 26759363296, 265338415104, 1871331759456, 24675601835904, 166652846570112, 1969110048305664, 22090834149738048, 2586719545294006272, 22961806952814951168, 289429435718440962048
Offset: 0

Views

Author

Alois P. Heinz, Apr 10 2020

Keywords

Examples

			a(5) = 8: 12345, 14325, 14352, 21345, 25341, 52341, 54312, 54321.
		

Crossrefs

Showing 1-2 of 2 results.