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 A087650 #56 Jan 11 2025 17:06:50 %S A087650 1,0,2,3,12,40,163,714,3426,17721,98254,580316,3633281,24011156, %T A087650 166888166,1216070379,9264071768,73600798036,608476008123, %U A087650 5224266196934,46499892038438,428369924118313,4078345814329010,40073660040755336 %N A087650 a(n) = Sum_{k=0..n} (-1)^(n-k)*Bell(k). %C A087650 a(n) is the number of set partitions of [n] that contain exactly one singleton block and all other blocks contain an entry > this singleton. For example, a(3)=3 counts 124/3, 134/2, 1/234 but not 123/4. - _David Callan_, Aug 27 2014 %C A087650 Partial sums are A173109. - _Vladimir Reshetnikov_, Oct 29 2015 %F A087650 E.g.f.: exp(-x)*((exp(x)-1)*exp(exp(x)-1)+1). %F A087650 a(n) = (-1)^n + Bell(n) - A000296(n), with Bell(n) = A000110(n). - _Wolfdieter Lang_, Dec 01 2003 %F A087650 a(n) = A000296(n+1) + (-1)^n. - _David Callan_, Aug 27 2014 %F A087650 G.f.: 1/(1+x)/W(0), where W(k) = 1 - x/(1 - x*(k+1)/W(k+1) ); (continued fraction). - _Sergei N. Gladkovskii_, Nov 10 2014 %F A087650 a(0) = 1; a(n) = Sum_{k=1..n-1} binomial(n,k) * a(k-1). - _Ilya Gutkovskiy_, Mar 04 2021 %e A087650 G.f. = 1 + 2*x^2 + 3*x^3 + 12*x^4 + 40*x^5 + 163*x^6 + 714*x^7 + ... %t A087650 f[n_] := Sum[ StirlingS2[n, k], {k, 1, n}]; Table[(-1)^n + Sum[(-1)^(n - k)*f[k], {k, 0, n}], {n, 0, 23}] (* _Robert G. Wilson v_ *) %t A087650 Needs["DiscreteMath`Combinatorica`"]; Table[ Sum[(-1)^(n - k)*BellB[k], {k, 0, n}], {n, 0, 23}] (* _Robert G. Wilson v_ *) %o A087650 (Maxima) makelist(sum((-1)^(n-k)*belln(k),k,0,n),n,0,40); /* _Emanuele Munarini_, Sep 27 2012 */ %o A087650 (Sage) %o A087650 def A087650_list(len): # After the formula of David Callan. %o A087650 if len == 1: return [1] %o A087650 if len == 2: return [1,0] %o A087650 R = []; A = [1]; p = -1 %o A087650 for i in (0..len-1): %o A087650 A.append(A[0] - A[i]) %o A087650 A[i] = A[0] %o A087650 for k in range(i, 0, -1): %o A087650 A[k-1] += A[k] %o A087650 p = -p %o A087650 R.append(A[i+1] + p) %o A087650 return R %o A087650 A087650_list(24) # _Peter Luschny_, Aug 28 2014 %o A087650 (PARI) vector(30, n, n--; sum(k=0, n, (-1)^(n-k)*polcoeff(sum(i=0, k, prod( j=1, i, x / (1 - j*x)), x^k * O(x)), k))) \\ _Altug Alkan_, Oct 30 2015 %Y A087650 Cf. A000110, A000296, A005001, A005493, A173109. %K A087650 nonn %O A087650 0,3 %A A087650 _Vladeta Jovovic_, Sep 23 2003