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
A110706
Number of linear arrangements of n blue, n red and n green items such that there are no adjacent items of the same color.
Original entry on oeis.org
1, 6, 30, 174, 1092, 7188, 48852, 339720, 2403588, 17236524, 124948668, 913820460, 6732898800, 49918950240, 372104853600, 2786716100592, 20955408717396, 158149624268220, 1197390368733804, 9091866006950892, 69214297980023256, 528150412279712856
Offset: 0
-
[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)): k in [0..Floor(n/2)]]): n in [1..25]]; // G. C. Greubel, Nov 24 2018
-
a:= proc(n) option remember; `if`(n<2, 1+5*n,
((7*n-4)*a(n-1)+8*(n-2)^2*a(n-2)/(n+1))/n)
end:
seq(a(n), n=0..21); # Alois P. Heinz, Sep 09 2023
-
Table[2*(Sum[Binomial[n-1,k]*(Binomial[n-1,k]*Binomial[2n+1-2k, n+1]+Binomial[n-1,k+1]*Binomial[2n-2k,n+1]),{k,0,Floor[n/2]}]),{n,1,20}] (* Vaclav Kotesovec, Oct 18 2012 *)
Table[2 (Binomial[2 n + 1, n + 1] HypergeometricPFQ[{1 - n, 1 - n, 1/2 - n/2, -(n/2)}, {1, -(1/2) - n, -n}, 1] + (n - 1) Binomial[2 n, n + 1] HypergeometricPFQ[{1 - n, 2 - n, 1/2 - n/2, 1 - n/2}, {2, 1/2 - n, -n}, 1]), {n, 10}] (* Eric W. Weisstein, May 26 2017 *)
RecurrenceTable[{n(n+1)*a[n] == (n+1)*(7*n-4)*a[n-1] +8*(n-2)^2*a[n-2], a[1]==6, a[2]==30}, a, {n, 10}] (* Eric W. Weisstein, May 27 2017 *)
-
a(n)=2*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)))
-
[2*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
A190918
Number of permutations of n copies of 1..4 introduced in order 1..4 with no element equal to another within a distance of 1.
Original entry on oeis.org
1, 36, 1721, 94376, 5609649, 351574834, 22875971289, 1530622143864, 104650147201049, 7279277647839552, 513492654638478897, 36647810215955194122, 2641438793287744496337, 191996676519223794534702, 14057702378132873242943289, 1035863834231020871413190808
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....1....3....3....1....3....3....3....1....3
..4....1....4....2....4....1....2....3....4....4....3....4....1....2....2....4
..2....4....1....4....1....4....4....4....2....2....4....3....4....4....3....2
..4....2....2....3....3....2....1....3....3....1....2....1....3....1....4....4
..3....3....4....1....4....4....3....4....4....4....3....4....4....4....3....1
..1....4....3....4....2....3....4....2....1....3....4....2....2....3....4....3
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
A209349
Number A(n,k) of initially rising meander words, where each letter of the cyclic k-ary alphabet occurs n times; square array A(n,k), n>=0, k>=0, read by antidiagonals.
Original entry on oeis.org
1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 5, 1, 0, 1, 1, 1, 9, 29, 1, 0, 1, 1, 1, 11, 100, 182, 1, 0, 1, 1, 1, 16, 182, 1225, 1198, 1, 0, 1, 1, 1, 19, 484, 3542, 15876, 8142, 1, 0, 1, 1, 1, 25, 902, 17956, 76258, 213444, 56620, 1, 0, 1
Offset: 0
A(0,0) = A(0,k) = A(n,0) = 1: the empty word.
A(1,1) = 1 = |{a}|.
A(2,1) = 0 = |{ }|.
A(2,2) = 1 = |{abab}|.
A(2,3) = 5 = |{abacbc, abcabc, abcacb, abcbac, abcbca}|.
A(1,4) = 1 = |{abcd}|.
A(2,4) = 9 = |{ababcdcd, abadcbcd, abadcdcb, abcbadcd, abcbcdad, abcdabcd, abcdadcb, abcdcbad, abcdcdab}|.
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, ...
1, 0, 1, 5, 9, 11, 16, ...
1, 0, 1, 29, 100, 182, 484, ...
1, 0, 1, 182, 1225, 3542, 17956, ...
1, 0, 1, 1198, 15876, 76258, 749956, ...
1, 0, 1, 8142, 213444, 1753522, 33779344, ...
-
b:= proc() option remember; local n; n:= nargs;
`if`({args}={0}, 1,
`if`(args[2]>0, b(args[2]-1, args[i]$i=3..n, args[1]), 0)+
`if`(n>2 and args[n]>0, b(args[n]-1, args[i]$i=1..n-1), 0))
end:
A:= (n, k)-> `if`(n<2, 1, `if`(k<2, 1-k, b((n-1)$2, n$(k-2)))):
seq(seq(A(n, d-n), n=0..d), d=0..10);
-
b[args_List] := b[args] = Module[{n = Length[args]}, If[Union[args] == {0}, 1, If[args[[2]] > 0, b[Join[{args[[2]] - 1}, args[[3 ;; n]], { args[[1]]}]], 0] + If[n > 2 && args[[n]] > 0, b[Join[{args[[n]] - 1}, args[[1 ;; n - 1]]]], 0]]]; A[n_, k_] := If[n < 2, 1, If[k < 2, 1 - k, b[Join[{n - 1, n - 1}, Array[n&, k - 2]]]]]; Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Jan 21 2015, after Alois P. Heinz *)
A199126
Number of nX1 0..2 arrays with values 0..2 introduced in row major order, the number of instances of each value within one of each other, and no element equal to any horizontal or vertical neighbor.
Original entry on oeis.org
1, 1, 1, 3, 6, 5, 19, 37, 29, 124, 240, 182, 834, 1614, 1198, 5746, 11137, 8142, 40336, 78332, 56620, 287358, 559134, 400598, 2071558, 4038130, 2872754, 15079270, 29443040, 20824778, 110653854, 216379650, 152303410, 817542980, 1600817660
Offset: 1
All solutions for n=5
..0....0....0....0....0....0
..1....1....1....1....1....1
..2....2....2....0....2....0
..0....1....0....2....1....1
..2....2....1....1....0....2
Showing 1-10 of 10 results.
Comments