1, 1, 2, 1, 4, 3, 1, 4, 9, 4, 1, 8, 9, 16, 5, 1, 8, 9, 16, 25, 6, 1, 16, 27, 16, 25, 36, 7, 1, 16, 27, 16, 25, 36, 49, 8, 1, 32, 27, 64, 25, 36, 49, 64, 9, 1, 32, 81, 64, 25, 36, 49, 64, 81, 10, 1, 64, 81, 64, 125, 36, 49, 64, 81, 100, 11, 1, 64, 81, 64, 125, 36, 49, 64, 81, 100, 121, 12
Offset: 1
A293211
Triangle T(n,k) is the number of permutations on n elements with at least one k-cycle for 1 <= k <= n.
Original entry on oeis.org
1, 1, 1, 4, 3, 2, 15, 9, 8, 6, 76, 45, 40, 30, 24, 455, 285, 200, 180, 144, 120, 3186, 1995, 1400, 1260, 1008, 840, 720, 25487, 15855, 11200, 8820, 8064, 6720, 5760, 5040, 229384, 142695, 103040, 79380, 72576, 60480, 51840, 45360, 40320, 2293839, 1427895, 1030400, 793800, 653184, 604800, 518400, 453600, 403200, 362880
Offset: 1
T(n,k) (the first 8 rows):
: 1;
: 1, 1;
: 4, 3, 2;
: 15, 9, 8, 6;
: 76, 45, 40, 30, 24;
: 455, 285, 200, 180, 144, 120;
: 3186, 1995, 1400, 1260, 1008, 840, 720;
: 25487, 15855, 11200, 8820, 8064, 6720, 5760, 5040;
...
T(4,3)=8 since there are exactly 8 permutations on {1,2,3,4} with at least one 3-cycle: (1)(234), (1)(243), (2)(134), (2)(143), (3)(124), (3)(142), (4)(123), and (4)(132).
-
T:=(n,k)->n!*sum((-1)^(j+1)*(1/k)^j/j!,j=1..floor(n/k)); seq(seq(T(n,k),k=1..n),n=1..10);
-
Table[n!*Sum[(-1)^(j + 1)*(1/k)^j/j!, {j, Floor[n/k]}], {n, 10}, {k, n}] // Flatten (* Michael De Vlieger, Oct 02 2017 *)
A243987
Triangle read by rows: T(n, k) is the number of divisors of n that are less than or equal to k for 1 <= k <= n.
Original entry on oeis.org
1, 1, 2, 1, 1, 2, 1, 2, 2, 3, 1, 1, 1, 1, 2, 1, 2, 3, 3, 3, 4, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 3, 3, 3, 3, 4, 1, 1, 2, 2, 2, 2, 2, 2, 3, 1, 2, 2, 2, 3, 3, 3, 3, 3, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4
Offset: 1
T(6,4)=3 since there are 3 divisors of 6 that are less than or equal to 4, namely, 1, 2 and 3.
T(n,k) as a triangle, n=1..15:
1,
1, 2,
1, 1, 2,
1, 2, 2, 3,
1, 1, 1, 1, 2,
1, 2, 3, 3, 3, 4,
1, 1, 1, 1, 1, 1, 2,
1, 2, 2, 3, 3, 3, 3, 4,
1, 1, 2, 2, 2, 2, 2, 2, 3,
1, 2, 2, 2, 3, 3, 3, 3, 3, 4
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 2, 3, 4, 4, 5, 5, 5, 5, 5, 5, 6,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2,
1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
1, 1, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4
-
a243987 n k = a243987_tabl !! (n-1) !! (k-1)
a243987_row n = a243987_tabl !! (n-1)
a243987_tabl = map (scanl1 (+)) a051731_tabl
-- Reinhard Zumkeller, Apr 22 2015
-
T:=(n,k)->1/n!*eval(diff(sum(x^j/(1-x^j),j=1..k),x$n),x=0):
seq(seq(T(n,k), k=1..n), n=1..10);
# Alternative:
IversonBrackets := expr -> subs(true=1, false=0, evalb(expr)):
T := (n, k) -> add(IversonBrackets(irem(n, j) = 0), j = 1..k):
for n from 1 to 19 do seq(T(n, k), k = 1..n) od; # Peter Luschny, Jan 02 2021
-
T(n, k) = sumdiv(n, d, d<=k); \\ Michel Marcus, Jun 17 2014
A224711
Number of ballot results from n voters that prompt a run-off election when three candidates vie for two spots on a board.
Original entry on oeis.org
1, 0, 6, 6, 18, 90, 150, 420, 1890, 3570, 10206, 42966, 87318, 252252, 1019304, 2172456, 6319170, 24810786, 54712086, 159906318, 614406078, 1390381278, 4077926034, 15403838346, 35579546262, 104633453340, 389788932240, 915500037120, 2698033909680, 9934966920960
Offset: 0
For n=3, a(3)=6 since a three voter election has 6 possible ballot results that necessitate a run-off. Let A, B, and C denote the three candidates, and, for example, let [AB|AC|BC] denote a ballot result in which voter 1 votes for candidates A and B, voter 2 votes for candidates A and C, and voter 3 votes for candidates B and C. The 6 ballot results that necessitate a run-off election are then given by [AB|AC|BC], [AB|BC|AC], [AC|AB|BC], [AC|BC|AB], [BC|AB|AC], and [BC|AC|AB].
-
ind:= n-> piecewise(n mod 3=0, 1, 0):
u:= n-> floor(n/2+1)-floor(n/3+2/3)-1:
a:= n-> 3*add(binomial(n, 2*ceil((n-1)/2)-2*k)*
binomial(2*ceil((n-1)/2)-2*k, ceil((n-1)/2)-k), k=0..u(n))
-ind(n)*2*binomial(n, 2*n/3)*binomial(2*n/3, n/3):
seq(a(n), n=0..30);
A224542
Number of doubly-surjective functions f:[n]->[4].
Original entry on oeis.org
2520, 30240, 226800, 1367520, 7271880, 35692800, 165957792, 742822080, 3234711480, 13803744864, 58021888080, 241116750624, 993313349544, 4064913201216, 16549636147968, 67112688842496, 271323921459096, 1094303232174240, 4405390451382960, 17709538489849440
Offset: 8
a(9) = 30240 since there are 30240 ways to distribute 9 different toys to 4 children so that each child gets at least 2 toys. One child must get 3 toys and the other children get 2 toys each. There are 4 ways to pick the lucky kid. There are C(9,3) ways to choose the 3 toys for the lucky kid. There are 6!/(2!)^3 ways to distribute the remaining 6 toys among the 3 kids. We obtain 4*C(9,3)*6!/8=30240.
-
seq(eval(diff((exp(x)-x-1)^4,x$n),x=0),n=8..40);
-
nn=27; Drop[Range[0,nn]! CoefficientList[Series[(Exp[x]-x-1)^4, {x,0,nn}], x], 8] (* Geoffrey Critzer, Sep 28 2013 *)
-
my(x='x+O('x^66)); Vec(serlaplace((exp(x)-x-1)^4)) /* Joerg Arndt, Apr 10 2013 */
A224541
Number of doubly-surjective functions f:[n]->[3].
Original entry on oeis.org
90, 630, 2940, 11508, 40950, 137610, 445896, 1410552, 4390386, 13514046, 41278068, 125405532, 379557198, 1145747538, 3452182656, 10388002848, 31230066186, 93828607686, 281775226860, 845929656900, 2539047258150, 7619759016090, 22864712861880, 68605412870088
Offset: 6
For n=6 we have a(6)=90 since there are 90 six-digit positive integers using only digits 1, 2, and 3 with each of those digits appearing at least twice. The first 30 of the ninety, namely those with initial digit 1, are given below:
112233, 112323, 112332, 113223, 113232, 113322,
121233, 121323, 121332, 122133, 122313, 122331,
123123, 123132, 123213, 123231, 123312, 123321,
131223, 131232, 131322, 132123, 132132, 132213,
132231, 132312, 132321, 133122, 133212, 133221.
Cf.
A052515, the number of doubly-surjective functions f:[n]->[2].
-
seq(3^n-3*2^n-3*n*2^(n-1)+3+3*n+3*n^2, n=6..40);
-
With[{nn=40},Drop[CoefficientList[Series[(Exp[x]-x-1)^3,{x,0,nn}],x] Range[0,nn]!,6]] (* Harvey P. Dale, Oct 01 2015 *)
-
x='x+O('x^66); Vec(serlaplace((exp(x)-x-1)^3)) \\ Joerg Arndt, Apr 10 2013
A218832
Number of positive integer solutions to the Diophantine equation x + y + 2z = n^2.
Original entry on oeis.org
0, 1, 12, 49, 132, 289, 552, 961, 1560, 2401, 3540, 5041, 6972, 9409, 12432, 16129, 20592, 25921, 32220, 39601, 48180, 58081, 69432, 82369, 97032, 113569, 132132, 152881, 175980, 201601, 229920, 261121, 295392, 332929, 373932, 418609, 467172, 519841, 576840, 638401
Offset: 1
For n=3, a(n)=12 since there are exactly 12 positive integer solutions (x,y,z) to x+y+2z=9, namely, (1,2,3),(1,4,2), (1,6,1), (2,1,3), (2,3,2), (2,5,1), (3,2,2),(3,4,1), (4,1,2), (4,3,1), (5,2,1), and (6,1,1).
A182309
Triangle T(n,k) with 2 <= k <= floor(2(n+1)/3) gives the number of length-n binary sequences with exactly k zeros and with length two for the longest run of zeros.
Original entry on oeis.org
1, 2, 3, 2, 4, 6, 1, 5, 12, 6, 6, 20, 18, 3, 7, 30, 40, 16, 1, 8, 42, 75, 50, 10, 9, 56, 126, 120, 45, 4, 10, 72, 196, 245, 140, 30, 1, 11, 90, 288, 448, 350, 126, 15, 12, 110, 405, 756, 756, 392, 90, 5, 13, 132, 550, 1200, 1470, 1008, 357, 50, 1, 14, 156, 726
Offset: 2
For n=6 and k=3, T(6,3)=12 since there are 12 binary sequences of length 6 that contain 3 zeros and that have a maximum run of zeros of length 2, namely, 011100, 101100, 110100, 011001, 101001, 110010, 010011, 100110, 100101, 001110, 001101, and 001011.
Triangle T(n,k) begins
1,
2,
3, 2,
4, 6, 1,
5, 12, 6,
6, 20, 18, 3,
7, 30, 40, 16, 1,
8, 42, 75, 50, 10,
9, 56, 126, 120, 45, 4,
10, 72, 196, 245, 140, 30, 1,
11, 90, 288, 448, 350, 126, 15,
12, 110, 405, 756, 756, 392, 90, 5,
13, 132, 550, 1200, 1470, 1008, 357, 50, 1,
14, 156, 726, 1815, 2640, 2268, 1106, 266, 21,
15, 182, 936, 2640, 4455, 4620, 2898, 1016, 161, 6,
Row sums of triangle T(n,k)=
A000100(n+1);
-
seq(seq(sum(binomial(n-k+1,j)*binomial(n-k+1-j,k-2*j),j=1..floor(k/2)),k=2..floor(2*(n+1)/3)),n=2..20);
-
t[n_, k_] := Sum[ Binomial[n-k+1, j]*Binomial[n-k-j+1, k-2*j], {j, 1, k/2}]; Table[t[n, k], {n, 2, 15}, {k, 2, 2*(n+1)/3}] // Flatten (* Jean-François Alcover, Jun 06 2013 *)
A182210
Triangle T(n,k) = floor(k*(n+1)/(k+1)), 1 <= k <= n.
Original entry on oeis.org
1, 1, 2, 2, 2, 3, 2, 3, 3, 4, 3, 4, 4, 4, 5, 3, 4, 5, 5, 5, 6, 4, 5, 6, 6, 6, 6, 7, 4, 6, 6, 7, 7, 7, 7, 8, 5, 6, 7, 8, 8, 8, 8, 8, 9, 5, 7, 8, 8, 9, 9, 9, 9, 9, 10, 6, 8, 9, 9, 10, 10, 10, 10, 10, 10, 11, 6, 8, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12, 7, 9, 10, 11, 11, 12, 12, 12, 12, 12, 12, 12, 13, 7, 10, 11, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 8, 10, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 15
Offset: 1
T(12,4) = 10 since 10 is the maximum number of wins in a 12-game sequence in which the longest winning streak is 4. One such sequence with 10 wins is WWWWLWWWWLWW.
The triangle T(n,k) begins
1,
1, 2,
2, 2, 3,
2, 3, 3, 4,
3, 4, 4, 4, 5,
3, 4, 5, 5, 5, 6,
4, 5, 6, 6, 6, 6, 7,
4, 6, 6, 7, 7, 7, 7, 8,
5, 6, 7, 8, 8, 8, 8, 8, 9,
5, 7, 8, 8, 9, 9, 9, 9, 9, 10,
6, 8, 9, 9, 10, 10, 10, 10, 10, 10, 11,
6, 8, 9, 10, 10, 11, 11, 11, 11, 11, 11, 12,
-
a182210 n k = a182210_tabl !! (n-1) !! (k-1)
a182210_tabl = [[k*(n+1) `div` (k+1) | k <- [1..n]] | n <- [1..]]
-- Reinhard Zumkeller, Jul 08 2012
-
seq(seq(floor(k*(n+1)/(k+1)),k=1..n),n=1..15);
-
Flatten[Table[Floor[k*(n+1)/(k+1)],{n,0,20},{k,n}]] (* Harvey P. Dale, Jul 21 2015 *)
Comments