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 A361099 #22 Jun 10 2024 08:49:38 %S A361099 0,1,4,12,32,75,156,294,512,837,1300,1936,2784,3887,5292,7050,9216, %T A361099 11849,15012,18772,23200,28371,34364,41262,49152,58125,68276,79704, %U A361099 92512,106807,122700,140306,159744,181137,204612,230300,258336,288859,322012,357942,396800,438741 %N A361099 a(n) = n + 2*binomial(n,2) + 3*binomial(n,3) + 4*binomial(n,4). %C A361099 a(n) is the number of ordered set partitions of an n-set into 2 sets such that the first set has either 3, 2, 1 or no elements, the second set has no restrictions, and an element is selected from the second set. %H A361099 Paolo Xausa, <a href="/A361099/b361099.txt">Table of n, a(n) for n = 0..10000</a> %H A361099 <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5,-10,10,-5,1). %F A361099 E.g.f.: (1 + x + x^2/2 + x^3/6)*x*exp(x). %F A361099 From _Stefano Spezia_, Mar 04 2023: (Start) %F A361099 O.g.f.: x*(1 - x + 2*x^2 + 2*x^3)/(1 - x)^5. %F A361099 a(n) = A000290(n) + A004320(n-2). (End) %e A361099 The 294 set partitions for n=7 are the following (where the element selected from the second set is in parentheses): %e A361099 { }, {(1),2,3,4,5,6,7} (7 of these); %e A361099 {1}, {(2),3,4,5,6,7} (42 of these); %e A361099 {1,2}, {(3),4,5,6,7} (105 of these); %e A361099 {1,2,3}, {(4),5,6,7} (140 of these). %t A361099 Table[n^2*(n*(n - 3) + 8)/6, {n, 0, 50}] (* _Paolo Xausa_, Jun 10 2024 *) %o A361099 (Python) %o A361099 def A361099(n): return n**2*(n*(n - 3) + 8)//6 # _Chai Wah Wu_, Mar 24 2023 %Y A361099 Cf. A000290, A004320. %K A361099 nonn,easy %O A361099 0,3 %A A361099 _Enrique Navarrete_, Mar 01 2023