cp's OEIS Frontend

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.

A105486 Number of partitions of {1...n} containing 4 strings of 3 consecutive integers, where each string is counted within a block and a string of more than 3 consecutive integers are counted three at a time.

This page as a plain text file.
%I A105486 #19 May 10 2023 06:13:40
%S A105486 1,2,11,50,255,1362,7746,46556,294965,1963865,13703812,99974851,
%T A105486 760824922,6027441398,49616033975,423649629415,3746306203604,
%U A105486 34259548971914,323564415957687,3152120868598090,31638011553779137,326825518800658174,3471291152755614386
%N A105486 Number of partitions of {1...n} containing 4 strings of 3 consecutive integers, where each string is counted within a block and a string of more than 3 consecutive integers are counted three at a time.
%H A105486 Augustine O. Munagi, <a href="https://doi.org/10.1155/IJMMS.2005.215">Set Partitions with Successions and Separations</a>, Int. J. Math and Math. Sc., 2005:3 (2005), 451-463.
%F A105486 a(n) = Sum_{k=1..n} (c(n, k, 4), ), where c(n, k, 4) is the case r=4 of c(n, k, r) given by c(n, k, r)=c(n-1, k-1, r)+(k-1)c(n-1, k, r)+c(n-2, k-1, r)+(k-1)c(n-2, k, r)+c(n-1, k, r-1)-c(n-2, k-1, r-1)-(k-1)c(n-2, k, r-1), r=0, 1, .., n-k-1, k=1, 2, .., n-2r, c(n, k, 0) = Sum_{j= 0..floor(n/2)} binomial(n-j, j)*S2(n-j-1, k-1).
%e A105486 a(7) = 2 because the partitions of {1,...,7} with 4 strings of 3 consecutive integers are 123456/7, 1/234567.
%p A105486 c := proc(n,k,r) option remember ; local j ; if r =0 then add(binomial(n-j,j)*combinat[stirling2](n-j-1,k-1),j=0..floor(n/2)) ; else if r <0 or r > n-k-1 then RETURN(0) fi ; if n <1 then RETURN(0) fi ; if k <1 then RETURN(0) fi ; RETURN( c(n-1,k-1,r)+(k-1)*c(n-1,k,r)+c(n-2,k-1,r)+(k-1)*c(n-2,k,r) +c(n-1,k,r-1)-c(n-2,k-1,r-1)-(k-1)*c(n-2,k,r-1) ) ; fi ; end: A105486 := proc(n) local k ; add(c(n,k,4),k=1..n) ; end: for n from 6 to 29 do printf("%d, ",A105486(n)) ; od ; # _R. J. Mathar_, Feb 20 2007
%t A105486 S2[_, -1] = 0;
%t A105486 S2[n_, k_] = StirlingS2[n, k];
%t A105486 c[n_, k_, r_] := c[n, k, r] = Which [r == 0, Sum[Binomial[n - j, j]*S2[n - j - 1, k - 1], {j, 0, Floor[n/2]}], r < 0 || r > n - k - 1, 0, n < 1, 0, k < 1, 0, True, c[n - 1, k - 1, r] + (k - 1)*c[n - 1, k, r] + c[n - 2, k - 1, r] + (k - 1)*c[n - 2, k, r] + c[n - 1, k, r - 1] - c[n - 2, k - 1, r - 1] - (k - 1)*c[n - 2, k, r - 1]];
%t A105486 A105486[n_] := Sum[c[n, k, 4], {k, 1, n}];
%t A105486 Table[A105486[n], {n, 6, 29}] (* _Jean-François Alcover_, May 10 2023, after _R. J. Mathar_ *)
%Y A105486 Cf. A105485, A105487, A105490, A105494.
%K A105486 nonn
%O A105486 6,2
%A A105486 _Augustine O. Munagi_, Apr 10 2005
%E A105486 More terms from _R. J. Mathar_, Feb 20 2007