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 A159915 #12 Sep 18 2024 02:28:04 %S A159915 0,0,0,1,2,2,3,6,8,8,10,15,18,18,21,28,32,32,36,45,50,50,55,66,72,72, %T A159915 78,91,98,98,105,120,128,128,136,153,162,162,171,190,200,200,210,231, %U A159915 242,242,253,276,288,288,300,325,338,338,351,378,392,392,406,435,450,450 %N A159915 a(n) = floor((n+1)/4)*floor(n/2). %C A159915 Half the number of (n-2)-element subsets of {1,...,n} with odd sum of the elements. %C A159915 This is half the antepenultimate column of A159916, cf. formula. %C A159915 The number of subsets of {1,...,n} with n-2 elements, adding up to an odd integer, is always even (cf. examples), so we divide it by 2. %C A159915 We prefer to include a(0)=a(1)=a(2)=0, even if it might seem more natural to start only at n=2 or n=3. %C A159915 From the rational g.f. it can be seen that the sequence is a linear recurrence with constant coefficients (3,-5,7,-7,5,-3,1) of order 7. %C A159915 A quasipolynomial of order 4 and degree 2. - _Charles R Greathouse IV_, Sep 18 2024 %H A159915 G. C. Greubel, <a href="/A159915/b159915.txt">Table of n, a(n) for n = 0..10000</a> %H A159915 <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3,-5,7,-7,5,-3,1). %F A159915 G.f.: x^3*(1 - x + x^2)/(1 - 3*x + 5*x^2 - 7*x^3 + 7*x^4 - 5*x^5 + 3*x^6 - x^7) = x^3*(1-x+x^2)/((1-x)^3*(1+x^2)^2). %F A159915 a(n) = 3*a(n-1) - 5*a(n-2) + 7*a(n-3) - 7*a(n-4) + 5*a(n-5) - 3*a(n-6) + a(n-7) for n > 7. %F A159915 For n > 2, a(n) = A159916(n*(n-1)/2 + n - 2)/2 = T(n,n-2)/2 as defined there. %F A159915 From _M. F. Hasler_, May 03 2009: (Start) %F A159915 a(n) = floor((n+1)/4)*floor(n/2). %F A159915 a(2n+1) = A093005(n). %F A159915 a(2n) = A093353(n-1) = floor(n/2)*n. (End) %F A159915 a(n) ~ n^2/8. - _Charles R Greathouse IV_, Sep 18 2024 %e A159915 a(0)=a(1)=0 since there are no subsets with -2 or -1 elements. %e A159915 a(2)=0 since the sum of the elements of a 0-element subset is zero. %e A159915 a(3)=1 since for n=3 we have two singleton subsets of {1,2,3}, {1} and {3}, with odd sum of elements. %e A159915 a(4)=2 since for n=4 we have four 2-element subsets of {1,2,3,4} with odd sum: {1,2}, {2,3}, {1,4}, {3,4}. %t A159915 Table[Floor[(n+1)/4]*Floor[n/2], {n,0,70}] (* _G. C. Greubel_, Sep 18 2024 *) %o A159915 (PARI) A159915(n)= polcoeff( (1-x+x^2)/((1-x)^3*(1+x^2)^2) + O(x^(n-2)), n-3); %o A159915 a(n,t=[0,0,0,1,2,2,3],c=[1,-3,5,-7,7,-5,3]~)=while(n-->5,t=concat(vecextract(t,"^1"),t*c));t[n+2] /* Note: a(n+1,[0,0,0,0,1,2,2]) gives the same result as a(n) */ %o A159915 (PARI) A159915(n)=(n+1)\4*(n\2) \\ _M. F. Hasler_, May 03 2009 %o A159915 (Magma) %o A159915 A159915:= func< n | Floor((n+1)/4)*Floor(n/2) >; %o A159915 [A159915(n): n in [0..70]]; // _G. C. Greubel_, Sep 18 2024 %o A159915 (SageMath) %o A159915 def A159915(n): return ((n+1)//4)*(n//2) %o A159915 [A159915(n) for n in range(71)] # _G. C. Greubel_, Sep 18 2024 %Y A159915 Cf. A093005, A093353, A159916. %K A159915 easy,nonn %O A159915 0,5 %A A159915 _M. F. Hasler_, May 01 2009, May 03 2009