This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A264750 #73 Sep 08 2022 08:46:14 %S A264750 5,29,99,259,574,1134,2058,3498,5643,8723,13013,18837,26572,36652, %T A264750 49572,65892,86241,111321,141911,178871,223146,275770,337870,410670, %U A264750 495495,593775,707049,836969,985304,1153944,1344904,1560328,1802493,2073813,2376843,2714283 %N A264750 Number of sequences of 5 throws of an n-sided die (with faces numbered 1, 2, ..., n) in which the sum of the throws first reaches or exceeds n on the 5th throw. %C A264750 Sequence gives the second column of A185508. [_Bruno Berselli_, Nov 24 2015] %C A264750 Number of 5-tuples (t_1, ..., t_5) with 1 <= t_j <= n, Sum_{j <= 4} t_j < n and Sum_{j<=5} t_j >= n. - _Robert Israel_, Nov 25 2015 %H A264750 Colin Barker, <a href="/A264750/b264750.txt">Table of n, a(n) for n = 5..1000</a> %H A264750 Louis Rogliano, <a href="/A264750/a264750.pdf">Sequence A264750</a> %H A264750 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (6,-15,20,-15,6,-1). %F A264750 From _Colin Barker_, Nov 23 2015: (Start) %F A264750 a(n) = (n - 4)*(n - 3)*(n - 2)*(n - 1)*(4*n + 5)/120. %F A264750 a(n) = 6*a(n-1) - 15*a(n-2) + 20*a(n-3) - 15*a(n-4) + 6*a(n-5) - a(n-6) for n>10. %F A264750 G.f.: x^5*(5 - x) / (1 - x)^6. (End) %e A264750 From _Jon E. Schoenfield_, Nov 26 2015: (Start) %e A264750 For n=5, the a(5) = 5 sequences (i.e., quintuples or 5-tuples) are {1,1,1,1,1}, {1,1,1,1,2}, {1,1,1,1,3}, {1,1,1,1,4} and {1,1,1,1,5}. (Each of the first four throws must be a 1; otherwise, the sum of the throws would reach or exceed 5 before the 5th throw.) %e A264750 For n=6, each of the quintuples must have four throws whose sum is less than 6, followed by a fifth throw that brings the sum to at least 6, so the a(6) = 29 quintuples are the 5 quintuples {1,1,1,1,t_5} where t_5 is any value in 2..6 and the four sets of 6 quintuples {1,1,1,2,t_5}, {1,1,2,1,t_5}, {1,2,1,1,t_5} and {2,1,1,1,t_5} where t_5 is any value in 1..6. (End) %p A264750 A264750:=n->(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120: seq(A264750(n), n=5..50); # _Wesley Ivan Hurt_, Nov 24 2015 %t A264750 f[n_, k_] := Module[ %t A264750 {i, total = 0, part, perm}, %t A264750 part = IntegerPartitions[n, {k}]; %t A264750 perm = Flatten[Table[Permutations[part[[i]]], {i, 1, Length[part]}], 1]; %t A264750 For[i = 1, i <= Length[perm], i++, total += n + 1 - perm[[i, k]] ]; %t A264750 Return[total]; ] %t A264750 And the sequences are obtained by: %t A264750 h[k_] := Table[f[i, k], {i, k, number_of_terms_wanted}] %t A264750 Table[(n - 4) (n - 3) (n - 2) (n - 1) (4 n + 5)/120, {n, 5, 40}] (* _Bruno Berselli_, Nov 24 2015 *) %o A264750 (PARI) Vec(x^5*(5-x)/(1-x)^6 + O(x^100)) \\ _Colin Barker_, Nov 23 2015 %o A264750 (PARI) for(n=5, 40, print1((n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120", ")); \\ _Bruno Berselli_, Nov 24 2015 %o A264750 (Magma) [(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120: n in [5..40]]; // _Vincenzo Librandi_, Nov 24 2015 %o A264750 (Sage) [(n-4)*(n-3)*(n-2)*(n-1)*(4*n+5)/120 for n in (5..40)] # _Bruno Berselli_, Nov 24 2015 %Y A264750 Cf. A000096 (k=2), A051925 (k=3), A215862 (k=4). %Y A264750 Cf. A185508. %K A264750 nonn,easy %O A264750 5,1 %A A264750 _Louis Rogliano_, Nov 23 2015 %E A264750 Offset changed by _Robert Israel_, Nov 25 2015 %E A264750 Formulae, b-file adapted to the new offset and definition rephrased by the Editors of the OEIS, Nov 26 2015