1 2 Journal of Integer Sequences, Vol. 17 (2014), 3 Article 14.1.1 47 6 23 11
Periodicity of the Last Digits of Some Combinatorial Sequences1
Istv´an Mez˝o Escuela Polit´ecnica Nacional Departamento de Matem´atica Ladr´on de Guevara E11-253 Quito, Ecuador [email protected]
Abstract
In 1962 O. A. Gross proved that the last digits of the Fubini numbers (or surjective numbers) have a simple periodicity property. We extend this result to a wider class of combinatorial numbers coming from restricted set partitions.
1 The Stirling numbers of the second kind and the Fubini numbers
The nth Fubini number or surjection number [18, 22, 31, 34, 35], Fn, counts all the possible n partitions of n elements such that the order of the blocks matters. The k Stirling number of the second kind with parameters n and k enumerates the partitions of n elements into k blocks. Thus, Fn has the following expression:
n n F = k! . (1) n k k X=0 The first Fubini numbers are presented in the next table:
1This scientific work was financed by Proyecto Prometeo de la Secretar´ıa Nacional de Ciencia, Tecnolog´ıa e Innovaci´on (Ecuador).
1 F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 1 3 13 75 541 4683 47293 545 835 7087261 102247563
We may realize that the last digits form a periodic sequence of length four. This is true up to infinity. That is, for all n ≥ 1 Congruence 1. Fn+4 ≡ Fn (mod 10). A proof was given by Gross [20] which uses backward differences. Later we give a simple combinatorial proof. We note that if the order of the blocks does not matter, we get the Bell numbers [11]:
n n B = . n k k X=0 This sequence does not possess this “periodicity property”. Now we introduce other classes of numbers which do share this periodicity.
2 The r-Stirling and r-Fubini numbers
r n k n The -Stirling number of the second kind with parameters and is denoted by k r and enumerates the partitions of n elements into k blocks such that all the first r elements are in different blocks. So, for example, {1, 2, 3, 4, 5} can be partitioned into {1, 4, 5} ∪ {2, 3} but {1, 2} ∪ {3, 5} ∪ {4} is forbidden, if r ≥ 2. An introductory paper on r-Stirling numbers is due to Broder [5]. A good source of combinatorial identities on r-Stirling numbers is a book of Charalambides [6]. (Note that in this book these numbers are called noncentral Stirling numbers.) Similarly to (1) we can introduce the r-Fubini numbers as
n n + r F = (k + r)! . (2) n,r k + r k r X=0 (It is worthwile to shift the indices, since the upper and lower parameters have to be at least r, so n and k can run from zero in the formula.) We note that the literature of these numbers is rather thin. From the analytical point of view they were discussed by Corcino and his co-authors [12]. The present author with Nyul [28] is preparing a manuscript which studies these numbers in a combinatorial way. The first 2-Fubini and 3-Fubini numbers are
F1,2 F2,2 F3,2 F4,2 F5,2 F6,2 F7,2 F8,2 10 62 466 4 142 42 610 498 542 6 541 426 95 160 302
and
2 F1,3 F2,3 F3,3 F4,3 F5,3 F6,3 F7,3 F8,3 42 342 3 210 34 326 413 322 5 544 342 82 077 450 1 330 064 406 We see that the sequence of the last digits is also periodic with period four: Congruence 2. Fn+4,r ≡ Fn,r (mod 10) (n,r ≥ 1). If the order of the blocks does not interest us, we get the r-Bell numbers:
n n + r B = . n,r k + r k r X=0 These numbers were discussed combinatorially in a paper of the present author [26] and analytically by Corcino and his co-authors [13, 14], and also by Dil and Kurt [15]. The table of these numbers [26] shows that there is possibly no periodicity in the last digits of the r-Bell numbers.
3 Restricted Stirling numbers and three derived se- quences
n Let us go further and introduce another class of Stirling numbers. The k ≤m restricted Stirling number of the second kind [1, 8, 9, 10] gives the number of partitions of n elements into k subsets under the restriction that none of the blocks contain more than m elements. The notation reflects this restrictive property. The sum of restricted Stirling numbers gives the restricted Bell numbers [30]:
n n B = . n,≤m k k ≤m X=0 Their tables are as follows:
B1,≤2 B2,≤2 B3,≤2 B4,≤2 B5,≤2 B6,≤2 B7,≤2 B8,≤2 B9,≤2 B10,≤2 B11,≤2 1 2 4 10 26 76 232 764 2 620 9 496 35 696
B1,≤3 B2,≤3 B3,≤3 B4,≤3 B5,≤3 B6,≤3 B7,≤3 B8,≤3 B9,≤3 B10,≤3 B11,≤3 1 2 5 14 46 166 652 2 780 12 644 61 136 312 676
B1,≤4 B2,≤4 B3,≤4 B4,≤4 B5,≤4 B6,≤4 B7,≤4 B8,≤4 B9,≤4 B10,≤4 B11,≤4 1 2 5 15 51 196 827 3 795 18 755 99 146 556 711
If we eliminate the first elements B1,≤2 and B1,≤3,B2,≤3,B3,≤3 we can see that these sequences, for m =2, 3, seem to be periodic of length five: Congruence 3. Bn,≤2 ≡ Bn+5,≤2 (mod 10) (n> 1).
Bn,≤3 ≡ Bn+5,≤3 (mod 10) (n> 3).
3 The third table shows that such kind of congruence cannot be proven if m = 4. The proof of the above congruence for m = 2, 3 is contained in the 5.3 subsection. We will also explain why this property fails to hold whenever m> 3. What happens, if we take restricted Fubini numbers, as
n n F = k! ? (3) n,≤m k k ≤m X=0 The next congruences hold. Congruence 4.
Fn,≤1 ≡ 0 (mod10) (n> 4),
Fn,≤m ≡ 0 (mod10) (n> 4,m =2, 3, 4), (4)
Fn,≤m ≡ 0 (mod2) (n>m,m> 4). (5)
The first congruence is trivial, since Fn,≤1 = n!. The others will be proved in subsection 5.4. If we consider restricted Stirling numbers of the first kind, a similar conjecture can be phrased. These numbers with parameter n, k and m count all the permutations on n elements with k cycles such that all cycles contain at most m items. Let us denote these numbers by n k ≤m. Then let n n A = . n,≤m k k ≤m X=0 We may call these as restricted factorials, since if m = n (there is no restriction) we get that An,≤m = n!. Note that the sequence (n!) is clearly periodic in the present sense, because n! ≡ 0 (mod 10) if n> 4. The tables
A1,≤3 A2,≤3 A3,≤3 A4,≤3 A5,≤3 A6,≤3 A7,≤3 A8,≤3 A9,≤3 A10,≤3 A11,≤3 1 2 6 18 66 276 1 212 5 916 31 068 171 576 1 014 696
A1,≤4 A2,≤4 A3,≤4 A4,≤4 A5,≤4 A6,≤4 A7,≤4 A8,≤4 A9,≤4 A10,≤4 A11,≤4 1 2 6 24 96 456 2 472 14 736 92 304 632 736 4 661 856 suggest that An,≤m is perhaps periodic of order five. The next result can be phrased as follows: Congruence 5. An,≤m ≡ An+5,≤m (mod 10) (n> 2,m =2, 3, 4). Our argument presented in the subsection 5.5 will show that the restricted factorial numbers all terminate with digit 0 if n > 4 and m > 4, this is the reason why we excluded above the case m> 4. Note that An,≤2 = Bn,≤2 and this number equals to the number of involutions on n elements. (Involution is a permutation π such that π2 = 1, the identity permutation.).
4 4 The associated Stirling numbers
At the end we turn to the definition of the associated Stirling numbers. The m-associated n k n Stirling number of the second kind with parameters and , denoted by k ≥m, gives the number of partitions of an n element set into k subsets such that every block contains at least m elements [11, p. 221]. The associated Bell numbers are n n B = . n,≥m k k ≥m X=0 The tables for m =2, 3, 4 (Bn,≥1 = Bn, the nth Bell number) follow.
B1,≥2 B2,≥2 B3,≥2 B4,≥2 B5,≥2 B6,≥2 B7,≥2 B8,≥2 B9,≥2 B10,≥2 B11,≥2 0 1 1 4 11 41 162 715 3 425 17 722 98 253
B1,≥3 B2,≥3 B3,≥3 B4,≥3 B5,≥3 B6,≥3 B7,≥3 B8,≥3 B9,≥3 B10,≥3 B11,≥3 0 0 1 1 1 11 36 92 491 2 557 11 353
B1,≥4 B2,≥4 B3,≥4 B4,≥4 B5,≥4 B6,≥4 B7,≥4 B8,≥4 B9,≥4 B10,≥4 B11,≥4 0 0 0 1 1 1 1 36 127 337 793 Here one cannot observe periodicity in the last digits. However, this is not the case, if we take the associated Fubini numbers, where the order of the blocks counts:
n n F = k! . n,≥m k k ≥m X=0 Since Fn,≥1 = Fn, the nth Fubini number, we present the table of these numbers for m = 2, 3, 4:
F1,≥2 F2,≥2 F3,≥2 F4,≥2 F5,≥2 F6,≥2 F7,≥2 F8,≥2 F9,≥2 F10,≥2 F11,≥2 0 1 1 7 21 141 743 5 699 42 241 382 153 3 586 155
F1,≥3 F2,≥3 F3,≥3 F4,≥3 F5,≥3 F6,≥3 F7,≥3 F8,≥3 F9,≥3 F10,≥3 F11,≥3 0 0 1 1 1 21 71 183 2 101 13 513 64 285
F1,≥4 F2,≥4 F3,≥4 F4,≥4 F5,≥4 F6,≥4 F7,≥4 F8,≥4 F9,≥4 F10,≥4 F11,≥4 0 0 0 1 1 1 1 71 253 673 1 585 The next special values are trivial:
F0,≥m =1, Fn,≥m =0(0 5 5 Proof of the congruences Now we start to give the proofs of the above congruences. 5.1 The Fubini numbers – Congruence 1 We prove Congruence 1 of Gross, which states that Fn+4 ≡ Fn (mod 10). Let n> 4. By the definition, n n +4 n +4 n F − F = k! − k! = n+4 n k k k k X=0 X=0 n n +4 n +4 n 4 n +4 4 n k! − k! + k! − k! ≡ k k k k k k k k X=5 X=5 X=0 X=0 n +4 n +4 n +4 n +4 n +4 + +2 +6 + 24 0 1 2 3 4 n n n n n − − − 2 − 6 − 24 (mod 10). 0 1 2 3 4 n n Because of the special values 0 = 0, 1 = 1, the first two members cancel. The remaining terms are divisible by two, so it is enough to prove that n +4 n +4 n +4 n n n 5 +3 + 12 − − 3 − 12 . 2 3 4 2 3 4 The special values [4, p. 12.] n n 1 n 1 1 1 =2n−1 − 1, = 3n−1 − 2n +1 , = 4n−1 − 3n−1 +2n−2 − 2 3 2 4 6 2 6 give that n +4 n − =2n+3 − 1 − (2n−1 − 1) = 15 · 2n−1, 2 2 n +4 n 3 3 − 3 = 3n−1(34 − 1) − 2n(24 − 1) , 3 3 2 n +4 n 12 1 12 − 12 = 4n−1(44 − 1) − 3n−1(34 − 1)+2n−2(24 − 1) . 4 4 2 3 All of these numbers – independently from n – are divisible by 5, so we proved the periodicity of Fubini numbers. 6 5.2 The r-Fubini numbers – Congruence 2 The generalization of the congruence of Gross to the r-Stirling case states that Fn+4,r ≡ Fn,r (mod 10) (n,r ≥ 1). Definition (2) immediately gives that if r > 5, 10 | Fn,r for all n > 0, so the periodicity is trivial. If r = 1, we get back the ordinary Fubini numbers (up to a shifting), so we can restrict ourselves to 2 ≤ r ≤ 4. So r=2 n +4+ r n +4+ r n +4+ r F − F ≡ 2 +6 + 24 n+4,r n,r r r +1 r +2 r r r n + r n + r n + r − 2 − 6 − 24 , r r +1 r +2 r r r r=3 n +4+ r n +4+ r ≡ 6 + 24 r r +1 r r n + r n + r − 6 − 24 , r r +1 r r r=4 n +4+ r n + r ≡ 24 − 24 (mod 10). r r r r We need the following special values: n + r = rn, (6) r r n + r =(r + 1)n − rn, (7) r +1 r n + r 1 1 = (r + 2)n − (r + 1)n + rn. (8) r +2 2 2 r The first identity can be proven easily: the left hand side counts the partitions of n + r elements into r subsets such that the first r elements are in different subsets. Such partitions can be formed in the following way: we put the first r elements into singletons and the remaining n elements go to these r blocks independently: we have rn possibilities. The proof of the second special value is similar, but now we have an additional block. We put again our first r elements into r different blocks, and the remaining n elements go to these and to the additional block. Up to now we have (r + 1)n possibilities. But the last block cannot be empty, so we have to exclude the cases when all the n elements go to the first r partition. The number of such cases is rn. These considerations give (7). The left hand side of the third identity is the number of partitions of n + r elements into r + 2 blocks with the usual restriction. Let us suppose that the two additional blocks n contain k elements from n. We can choose these elements in k ways and then we construct 7 k a partition with the two blocks: 2 possibilities. (Note that k ≥ 2.) The remaining n − k elements go to the first r block independently in rn−k ways. We sum on k to get n n + r n k = rn−k. r +2 k 2 r k X=2 k k−1 Since 2 =2 − 1, the binomial theorem yields the desired identity. We go back to prove our congruence of the r-Fubini numbers. Since the others are simpler and similar, we deal only with the case r = 2; we prove that n +4+ r n +4+ r n +4+ r F − F ≡ 2 +6 + 24 n+4,r n,r r r +1 r +2 r r r n + r n + r n + r −2 − 6 − 24 ≡ 0 (mod 10). r r +1 r +2 r r r It is enough to prove that the paired terms with the same lower parameter are divisible by five. Our special r-Stirling number values imply that n +4+ r n + r − =2n(24 − 1), r r r r n +4+ r n + r − =3n(34 − 1) − 2n(24 − 1), r +1 r +1 r r n +4+ r n + r 1 1 − = 4n(44 − 1) − 3n(34 − 1) + 2n(24 − 1). r +2 r +2 2 2 r r For any n> 0, these values are all divisible by five, so we are done. 5.3 The restricted Bell numbers – Congruence 3 Let us prove Congruence 3. Miksa, Moser and Wyman [30] proved that Congruence 8. Bn+p,≤m ≡ Bn,≤m (mod p) (m Utilizing (9), we can prove the periodicity of the last digits if we prove that Bn,≤m is even. This will hold just when m =2 or 3. A theorem of Miksa, Moser, and Wyman [30, Theorem 2.] says that n n n B ≤ = B ≤ + B − ≤ + B − ≤ + ··· + B − ≤ . (9) n+1, m n, m 1 n 1, m 2 n 2, m m − 1 n m+1, m 8 In particular, if m = 2, we have n B ≤ = B ≤ + B − ≤ , n+1, 2 n, 2 1 n 1, 2 and if m = 3, then n n B ≤ = B ≤ + B − ≤ + B − ≤ . n+1, 3 n, 3 1 n 1, 3 2 n 2, 3 These show that if two (resp. three) consecutive terms are even, then all the rest are also even. Checking the tables given above, we have, in particular, that Bn,≤2 is even for all n ≥ 2 and Bn,≤3 is even for all n ≥ 4. Taking the above considerations, Congruence 3 is proven. Although Bn,≤4 does not share this property for small n, it can happen that for a large n three consecutive terms are even. This would imply the periodicity from that index. For larger m this is not enough, because Congruence 9 does not hold for these m. 5.3.1 A formula for the restricted Bell numbers Although we do not need them, we also can prove easily the following properties: Bn,≤m = Bn (n ≤ m), n−m n B ≤ = B − B − − (m Here Bn is the nth Bell number, defined by n n B = . n k k X=0 The case n ≤ m is trivial, since n