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.

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

This page as a plain text file.
%I A333892 #40 Nov 16 2020 11:13:08
%S A333892 1,1,2,4,14,36,320,1328,7872,51552,756480,5440752,68999136,584117952,
%T A333892 9632932800,152699071104,1881048314880,21977611223040,343998708042240,
%U A333892 4374197540536320,77078374650869760,1646804888482037760,45052372505959096320,727420047420178022400
%N A333892 Number of permutations sigma of [n] such that i divides Product_{k=1..i} sigma(k) for 1 <= i <= n.
%e A333892 a(5) = 36: 12345, 14325, 14352, 21345, 23145, 23415, 23451, 23541, 24315, 24351, 25341, 32145, 32415, 32451, 32541, 34125, 34152, 34215, 34251, 34512, 34521, 41325, 41352, 42315, 42351, 43125, 43152, 43215, 43251, 43512, 43521, 45312, 45321, 52341, 54312, 54321.
%p A333892 b:= proc(s) option remember; (n-> `if`(n=0, 1, `if`(irem(
%p A333892       mul(i, i=s), n)=0, add(b(s minus {j}), j=s), 0)))(nops(s))
%p A333892     end:
%p A333892 a:= n-> b({$1..n}):
%p A333892 seq(a(n), n=0..17);  # _Alois P. Heinz_, Apr 09 2020
%t A333892 b[s_] := b[s] = With[{n = Length[s]}, If[n==0, 1, If[Mod[Times@@s, n]==0, Sum[b[s ~Complement~ {j}], {j, s}], 0]]];
%t A333892 a[n_] := b[Range[n]];
%t A333892 a /@ Range[0, 20] (* _Jean-François Alcover_, Nov 16 2020, after _Alois P. Heinz_ *)
%o A333892 (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)}
%Y A333892 Cf. A320843, A333710.
%K A333892 nonn
%O A333892 0,3
%A A333892 _Seiichi Manyama_, Apr 09 2020
%E A333892 a(0), a(13)-a(23) from _Alois P. Heinz_, Apr 09 2020