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 A330298 #58 Apr 06 2025 00:01:49 %S A330298 0,0,0,0,2,3,9,12,24,30,50,60,90,105,147,168,224,252,324,360,450,495, %T A330298 605,660,792,858,1014,1092,1274,1365,1575,1680,1920,2040,2312,2448, %U A330298 2754,2907,3249,3420,3800,3990,4410,4620,5082,5313,5819,6072,6624,6900,7500,7800,8450,8775,9477 %N A330298 a(n) is the number of subsets of {1..n} that contain exactly 1 odd and 2 even numbers. %C A330298 The general formula for the number of subsets of {1..n} that contain exactly k odd and j even numbers is binomial(ceiling(n/2), k) * binomial(floor(n/2), j). %H A330298 Colin Barker, <a href="/A330298/b330298.txt">Table of n, a(n) for n = 0..1000</a> %H A330298 J.S. Seneschal, <a href="/A330298/a330298.jpg">Oblong Prism Illustration</a> %H A330298 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (1,3,-3,-3,3,1,-1). %F A330298 a(n) = ceiling(n/2) * binomial(floor(n/2), 2). %F A330298 From _Colin Barker_, Mar 01 2020: (Start) %F A330298 G.f.: x^4*(2 + x) / ((1 - x)^4*(1 + x)^3). %F A330298 a(n) = a(n-1) + 3*a(n-2) - 3*a(n-3) - 3*a(n-4) + 3*a(n-5) + a(n-6) - a(n-7) for n>6. (End) %F A330298 E.g.f.: (x*(-3 + x + x^2)*cosh(x) + (3 - x + x^3)*sinh(x))/16. - _Stefano Spezia_, Mar 02 2020 %F A330298 a(n) = 3/32-5*n^2/32-n/32+n^3/16+(-)^n*(n-3+n^2)/32. - _R. J. Mathar_, Mar 31 2025 %e A330298 For n=6, a(6) = 9 and the 9 subsets are: {1,2,4}, {1,2,6}, {1,4,6}, {2,3,4}, {2,3,6}, {2,4,5}, {2,5,6}, {3,4,6}, {4,5,6}. %t A330298 a[n_] := Ceiling[n/2] * Binomial[Floor[n/2], 2]; Array[a, 55, 0] (* _Amiram Eldar_, Mar 01 2020 *) %t A330298 Table[Length[Select[Subsets[Range[n],{3}],Total[Boole[OddQ[#]]]==1&]],{n,0,60}] (* _Harvey P. Dale_, Jul 26 2020 *) %o A330298 (PARI) a(n) = ceil(n/2) * binomial(floor(n/2), 2) \\ _Andrew Howroyd_, Mar 01 2020 %o A330298 (PARI) concat([0,0,0,0], Vec(x^4*(2 + x) / ((1 - x)^4*(1 + x)^3) + O(x^40))) \\ _Colin Barker_, Mar 02 2020 %Y A330298 Cf. A330299, A330300. %Y A330298 Cf. A000217, A002378. %Y A330298 Interleaves the positive integers of A006002 and A027480. %K A330298 nonn,easy %O A330298 0,5 %A A330298 _Enrique Navarrete_, Feb 29 2020