A322013
Square array A(n,k), n >= 1, k >= 1, read by antidiagonals, where A(n,k) is the number of permutations of n copies of 1..k introduced in order 1..k with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 1, 0, 1, 1, 0, 1, 5, 1, 0, 1, 36, 29, 1, 0, 1, 329, 1721, 182, 1, 0, 1, 3655, 163386, 94376, 1198, 1, 0, 1, 47844, 22831355, 98371884, 5609649, 8142, 1, 0, 1, 721315, 4420321081, 182502973885, 66218360625, 351574834, 56620, 1, 0
Offset: 1
Square array begins:
1, 1, 1, 1, 1, 1, ...
0, 1, 5, 36, 329, 3655, ...
0, 1, 29, 1721, 163386, 22831355, ...
0, 1, 182, 94376, 98371884, 182502973885, ...
0, 1, 1198, 5609649, 66218360625, 1681287695542855, ...
0, 1, 8142, 351574834, 47940557125969, 16985819072511102549, ...
- Seiichi Manyama, Antidiagonals n = 1..53, flattened
- Evgeniy Krasko, Igor Labutin, and Alexander Omelchenko, Enumeration of Labelled and Unlabelled Hamiltonian Cycles in Complete k-partite Graphs, arXiv:1709.03218 [math.CO], 2017.
- Mathematics.StackExchange, Find the number of k 1's, k 2's, ... , k n's - total kn cards, Apr 08 2012.
-
q(n,x) = sum(i=1, n, (-1)^(n-i) * binomial(n-1, n-i) * x^i/i!)
T(n,k) = subst(serlaplace(q(n,x)^k), x, 1)/k! \\ Andrew Howroyd, Feb 03 2024
A190917
Number of permutations of n copies of 1..3 introduced in order 1..3 with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 1, 5, 29, 182, 1198, 8142, 56620, 400598, 2872754, 20824778, 152303410, 1122149800, 8319825040, 62017475600, 464452683432, 3492568119566, 26358270711370, 199565061455634, 1515311001158482, 11535716330003876, 88025068713285476, 673124069796140900
Offset: 0
All solutions for n=2:
1 1 1 1 1
2 2 2 2 2
3 3 3 3 1
1 2 2 1 3
3 3 1 2 2
2 1 3 3 3
-
[(&+[Binomial(n-1, k)*(Binomial(n-1, k)*Binomial(2*n+1-2*k, n+1) + Binomial(n-1, k+1)*Binomial(2*n-2*k, n+1)): k in [0..Floor(n/2)]])/3: n in [1..25]]; // G. C. Greubel, Nov 24 2018
-
a:= proc(n) option remember; `if`(n<3, [1$2, 5][n+1],
((7*n-4)*a(n-1)+8*(n-2)^2*a(n-2)/(n+1))/n)
end:
seq(a(n), n=0..22); # Alois P. Heinz, Sep 09 2023
-
Table[(1/3)*Sum[Binomial[n-1, k]*(Binomial[n-1, k]*Binomial[2*n+1-2*k, n+1] + Binomial[n-1, k+1]*Binomial[2*n-2*k, n+1]), {k,0,Floor[n/2]}], {n,1,25}] (* G. C. Greubel, Nov 24 2018 *)
-
A190917(n) = sum(k=0, n\2, binomial(n-1, k)*(binomial(n-1, k)*binomial(2*n+1-2*k, n+1)+binomial(n-1, k+1)*binomial(2*n-2*k, n+1))) / 3; \\ Max Alekseyev, Dec 10 2017
-
[(1/3)*sum(binomial(n-1, k)*(binomial(n-1, k)*binomial(2*n+1-2*k, n+1) + binomial(n-1, k+1)*binomial(2*n-2*k, n+1)) for k in range(1+floor(n/2))) for n in (1..25)] # G. C. Greubel, Nov 24 2018
A190920
Number of permutations of n copies of 1..5 introduced in order 1..5 with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 329, 163386, 98371884, 66218360625, 47940557125969, 36533294879349056, 28920026907938624194, 23575497690601916022516, 19672658572012343899666292, 16730974132035148942028759656, 14455459908454408519322566567054
Offset: 1
Some solutions for n=2
..1....1....1....1....1....1....1....1....1....1....1....1....1....1....1....1
..2....2....2....2....2....2....2....2....2....2....2....2....2....2....2....2
..3....3....3....3....3....3....3....3....1....3....3....3....3....3....3....3
..4....4....2....1....4....4....4....4....3....4....4....4....1....4....4....4
..1....5....4....4....1....5....3....5....4....5....3....5....4....3....2....5
..5....3....5....2....5....2....4....4....5....2....2....3....5....2....3....2
..2....2....4....3....4....1....5....5....2....4....5....5....4....5....5....5
..5....1....3....5....2....3....1....1....4....3....1....4....2....1....4....4
..3....4....5....4....3....4....5....3....5....5....5....1....5....4....1....3
..4....5....1....5....5....5....2....2....3....1....4....2....3....5....5....1
A190923
Number of permutations of n copies of 1..6 introduced in order 1..6 with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 3655, 22831355, 182502973885, 1681287695542855, 16985819072511102549, 183095824753841610373405, 2070756746775910218326948065, 24302858067615766089801166488125, 293736218147318801678882792470437721
Offset: 1
Some solutions for n=2
..1....1....1....1....1....1....1....1....1....1....1....1....1....1....1....1
..2....2....2....2....2....2....2....2....2....2....2....2....2....2....2....2
..3....3....3....3....3....3....3....3....3....3....3....3....3....3....3....3
..4....2....4....4....4....2....4....4....4....4....4....4....4....4....4....4
..5....4....5....5....5....4....1....5....5....2....5....1....5....5....1....3
..1....5....4....3....3....1....3....4....2....5....6....4....6....6....5....4
..4....6....2....2....6....4....5....5....4....6....1....5....3....2....2....2
..5....3....1....6....5....5....6....1....5....5....5....6....2....6....6....5
..2....5....6....5....6....3....5....6....3....3....3....2....6....3....3....1
..6....6....5....6....2....6....4....3....6....4....6....5....4....1....6....6
..3....1....6....1....1....5....2....6....1....1....2....6....5....4....5....5
..6....4....3....4....4....6....6....2....6....6....4....3....1....5....4....6
A190927
Number of permutations of n copies of 1..7 introduced in order 1..7 with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 47844, 4420321081, 551248360550999, 81644850343968535401, 13519747358522016160671387, 2421032324142610480402567434373, 459408385876250801291447710561829082, 91155245844064069307740171414201519055298
Offset: 1
Some solutions for n=2:
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
4 4 4 4 4 2 2 4 4 4 2 4 4 4 4 2
5 5 5 1 5 4 4 2 5 5 4 2 1 3 2 1
6 6 6 5 6 5 3 5 3 6 5 4 4 5 5 4
2 7 4 6 7 6 5 6 6 3 6 5 5 6 6 5
7 3 5 4 2 3 6 5 7 7 7 1 6 4 4 6
5 4 2 2 1 5 7 6 2 6 3 6 7 5 7 7
6 5 6 3 6 4 5 1 4 1 7 3 2 7 1 3
4 6 1 5 7 7 7 3 7 7 5 7 5 2 7 4
3 2 7 7 5 1 1 7 1 5 1 6 7 1 5 6
7 7 3 6 4 6 6 4 5 4 6 5 6 7 6 7
1 1 7 7 3 7 4 7 6 2 4 7 3 6 3 5
A190932
Number of permutations of n copies of 1..8 introduced in order 1..8 with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 721315, 1133879136649, 2536823683737613858, 6945222145021508480249929, 21671513613423101256198918372909, 74115215422015289392187745053216373265, 271259741131895052775392614041761701799270286
Offset: 1
Some solutions for n=2
..1....1....1....1....1....1....1....1....1....1....1....1....1....1....1....1
..2....2....2....2....2....2....2....2....2....2....2....2....2....2....2....2
..1....3....3....1....1....1....3....1....3....3....1....1....1....1....3....1
..3....1....1....3....3....3....1....3....1....1....3....3....3....3....1....2
..4....4....4....4....4....4....4....4....2....4....4....4....4....4....4....3
..5....5....5....3....5....5....5....5....3....5....5....5....2....5....5....4
..6....4....3....5....6....6....6....4....4....3....4....6....5....6....2....5
..5....6....6....6....7....7....2....6....5....6....5....7....6....5....6....6
..6....7....7....7....5....2....3....7....6....5....6....8....7....7....7....7
..3....8....8....8....6....8....5....8....7....2....7....7....5....8....3....8
..2....5....2....7....8....6....7....3....4....7....2....5....8....3....8....3
..7....2....6....8....2....3....6....6....6....6....6....2....3....6....4....5
..8....8....7....4....3....4....8....5....8....7....7....3....7....4....6....7
..4....3....4....6....4....5....7....8....5....8....8....4....4....2....7....4
..8....7....5....5....8....8....8....2....7....4....3....8....8....7....8....8
..7....6....8....2....7....7....4....7....8....8....8....6....6....8....5....6
A321987
Number of permutations of n copies of 1..9 introduced in order 1..9 with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 12310199, 372419001449076, 16904301142107043464659, 967335448974819561548523580438, 64311863997340571475504065539218471107, 4749303210651587675797285013227098386984170468, 379065045836307787068046364731543393514652159389593652
Offset: 1
A377586
Numbers of directed Hamiltonian paths in the complete 4-partite graph K_{n,n,n,n}.
Original entry on oeis.org
24, 13824, 53529984, 751480602624, 27917203599360000, 2267561150913576960000, 354252505303682314076160000, 97087054992658680467800719360000, 43551509948777170973522371396239360000, 30293653795894300342540281328749772800000000
Offset: 1
-
Table[n!^4 * SeriesCoefficient[1/(1 - Sum[x[i]/(1 + x[i]), {i, 1, 4}]), Sequence @@ Table[{x[i], 0, n}, {i, 1, 4}]], {n, 1, 10}]
-
from math import factorial as fact, comb
from itertools import combinations_with_replacement
def a(n):
# Using modified formula for counting sequences found in Eifler et al.
result = 0
fn = fact(n)
for i, j, k in combinations_with_replacement(range(1, n+1), 3):
patterns = [(3,0,0)] if i == j == k else \
[(2,0,1)] if i == j != k else \
[(1,2,0)] if i != j == k else [(1,1,1)]
for a, b, c in patterns:
s = a*i + b*j + c*k
num = fact(3)
den = fact(a) * fact(b) * fact(c)
if a:
for _ in range(a): num, den = num * comb(n-1, i-1), den * fact(i)
if b:
for _ in range(b): num, den = num * comb(n-1, j-1), den * fact(j)
if c:
for _ in range(c): num, den = num * comb(n-1, k-1), den * fact(k)
num *= comb(s + 1, n) * fact(s)
result += (1 if (3*n - s) % 2 == 0 else -1) * (num // den)
for _ in range(4): result *= fn
return result
print([a(n) for n in range(1,11)]) # Zlatko Damijanic, Nov 18 2024
Showing 1-8 of 8 results.