login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A357328 Number of permutations p of [n] such that p(i) divides p(j) if i divides j for 1 <= i <= j <= n. 1

%I #42 Oct 02 2022 10:30:09

%S 1,1,1,2,1,2,1,2,2,2,1,2,2,6,4,2,2,6,6,24,24,24,6,24,24,24,12,12,12,

%T 48,48,240,240,120,48,48,48,240,144,96,96,480,480,2880,1440,1440,720,

%U 4320,4320,4320,4320,2880,2880,20160,20160,10080,10080,10080,2880,20160,20160,161280,60480,60480,60480,120960

%N Number of permutations p of [n] such that p(i) divides p(j) if i divides j for 1 <= i <= j <= n.

%C a(n) >= 1.

%H Seiichi Manyama, <a href="/A357328/b357328.txt">Table of n, a(n) for n = 0..5000</a>

%e For n = 14, the 4 permutations are:

%e [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14]

%e [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 13, 12, 11, 14]

%e [1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 11, 12, 13, 10]

%e [1, 2, 3, 4, 7, 6, 5, 8, 9, 14, 13, 12, 11, 10]

%o (Ruby)

%o require 'prime'

%o def f(n)

%o return 1 if n < 2

%o (1..n).inject(:*)

%o end

%o def A(n)

%o h = {}

%o Prime.each(n).each{|i|

%o h[i] = n / i

%o }

%o h.group_by{|k, v| v}.inject(1){|s, i| s * f(i.last.size)}

%o end

%o def A357328(n)

%o (0..n).map{|i| A(i)}

%o end

%o p A357328(100)

%Y Cf. A320843.

%K nonn

%O 0,4

%A _Seiichi Manyama_, Oct 01 2022

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 3 20:16 EDT 2024. Contains 374908 sequences. (Running on oeis4.)