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!)
A291551 Number of permutations s_1,s_2,...,s_n of 1,2,...,n such that for all j=1,2,...,n, Sum_{i=1..j} s_i divides Product_{i=1..j} s_i. 1
1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 0, 262, 0, 10226, 43964, 139484, 0, 13936472, 59652396, 301235944, 1915640632, 7969506364, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,16
COMMENTS
a(n) = 0 if n+1 does not divide 2*(n-1)!. This implies that a(p-1) = 0 for p > 2 prime. - Chai Wah Wu, Aug 26 2017
LINKS
EXAMPLE
a(15) = 26: [[10, 15, 5, 6, 4, 8, 2, 14, 11, 13, 3, 7, 1, 9, 12], [10, 15, 5, 6, 12, 2, 14, 11, 13, 3, 7, 1, 9, 4, 8], [10, 15, 5, 6, 12, 2, 14, 11, 13, 3, 9, 4, 1, 7, 8], [10, 15, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 3, 12], [10, 15, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 12, 3], [10, 15, 5, 6, 14, 13, 12, 3, 2, 11, 7, 1, 9, 4, 8], [10, 15, 5, 6, 14, 13, 12, 3, 2, 11, 9, 4, 1, 7, 8], [15, 10, 5, 6, 4, 8, 2, 14, 11, 13, 3, 7, 1, 9, 12], [15, 10, 5, 6, 12, 2, 14, 11, 13, 3, 7, 1, 9, 4, 8], [15, 10, 5, 6, 12, 2, 14, 11, 13, 3, 9, 4, 1, 7, 8], [15, 10, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 2, 7, 8, 11, 9, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 7, 2, 8, 11, 9, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 7, 8, 2, 11, 9, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 3, 12], [15, 10, 5, 6, 14, 13, 9, 8, 11, 7, 2, 4, 1, 12, 3], [15, 10, 5, 6, 14, 13, 12, 3, 2, 11, 7, 1, 9, 4, 8], [15, 10, 5, 6, 14, 13, 12, 3, 2, 11, 9, 4, 1, 7, 8]].
PROG
(Ruby)
def search(a, prod, sum, size, num)
if num == size + 1
@cnt += 1
else
(1..size).each{|i|
p, s = prod * i, sum + i
if a[i - 1] == 0 && p % s == 0
a[i - 1] = 1
search(a, p, s, size, num + 1)
a[i - 1] = 0
end
}
end
end
def A(n)
a = [0] * n
@cnt = 0
search(a, 1, 0, n, 1)
@cnt
end
def A291551(n)
(0..n).map{|i| A(i)}
end
p A291551(20)
CROSSREFS
Sequence in context: A116197 A023924 A022066 * A217232 A040681 A040682
KEYWORD
nonn,more
AUTHOR
Seiichi Manyama, Aug 26 2017
EXTENSIONS
a(26)-a(28) from Alois P. Heinz, Aug 26 2017
STATUS
approved

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 April 25 11:23 EDT 2024. Contains 371967 sequences. (Running on oeis4.)