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 A087787 #38 May 23 2024 20:53:16 %S A087787 1,0,2,1,4,3,8,7,15,15,27,29,48,53,82,94,137,160,225,265,362,430,572, %T A087787 683,892,1066,1370,1640,2078,2487,3117,3725,4624,5519,6791,8092,9885, %U A087787 11752,14263,16922,20416,24167,29007,34254,40921,48213,57345,67409 %N A087787 a(n) = Sum_{k=0..n} (-1)^(n-k)*A000041(k). %C A087787 Essentially first differences of A024786 (see the formula). Also, a(n) is the number of 2's in the last section of the set of partitions of n+2 (see A135010). - _Omar E. Pol_, Sep 10 2008 %C A087787 From _Gus Wiseman_, May 20 2024: (Start) %C A087787 Also the number of integer partitions of n containing an even number of ones, ranked by A003159. The a(0) = 1 through a(8) = 15 partitions are: %C A087787 () . (2) (3) (4) (5) (6) (7) (8) %C A087787 (11) (22) (32) (33) (43) (44) %C A087787 (211) (311) (42) (52) (53) %C A087787 (1111) (222) (322) (62) %C A087787 (411) (511) (332) %C A087787 (2211) (3211) (422) %C A087787 (21111) (31111) (611) %C A087787 (111111) (2222) %C A087787 (3311) %C A087787 (4211) %C A087787 (22211) %C A087787 (41111) %C A087787 (221111) %C A087787 (2111111) %C A087787 (11111111) %C A087787 Also the number of integer partitions of n + 1 containing an odd number of ones, ranked by A036554. %C A087787 (End) %H A087787 Vaclav Kotesovec, <a href="/A087787/b087787.txt">Table of n, a(n) for n = 0..10000</a> %F A087787 G.f.: 1/(1+x)*1/Product_{k>0} (1-x^k). %F A087787 a(n) = 1/n*Sum_{k=1..n} (sigma(k)+(-1)^k)*a(n-k). %F A087787 a(n) = A024786(n+2)-A024786(n+1). - _Omar E. Pol_, Sep 10 2008 %F A087787 a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n) * (1 + (11*Pi/(24*sqrt(6)) - sqrt(3/2)/Pi)/sqrt(n) - (11/16 + (23*Pi^2)/6912)/n). - _Vaclav Kotesovec_, Nov 05 2016 %F A087787 a(n) = A000041(n) - a(n-1). - _Jon Maiga_, Aug 29 2019 %F A087787 Alternating partial sums of A000041. - _Gus Wiseman_, May 20 2024 %t A087787 Table[Sum[(-1)^(n-k)*PartitionsP[k], {k,0,n}], {n,0,50}] (* _Vaclav Kotesovec_, Aug 16 2015 *) %t A087787 (* more efficient program *) sig = 1; su = 1; Flatten[{1, Table[sig = -sig; su = su + sig*PartitionsP[n]; Abs[su], {n, 1, 50}]}] (* _Vaclav Kotesovec_, Nov 06 2016 *) %t A087787 Table[Length[Select[IntegerPartitions[n], EvenQ[Count[#,1]]&]],{n,0,30}] (* _Gus Wiseman_, May 20 2024 *) %o A087787 (Python) %o A087787 from sympy import npartitions %o A087787 def A087787(n): return sum(-npartitions(k) if n-k&1 else npartitions(k) for k in range(n+1)) # _Chai Wah Wu_, Oct 25 2023 %Y A087787 Cf. A000041, A024786, A135010, A138121, A141285. %Y A087787 The unsigned version is A000070, strict A036469. %Y A087787 For powers of 2 instead number of partitions we have A001045. %Y A087787 The strict or odd version is A025147 or A096765. %Y A087787 The ordered version (compositions instead of partitions) is A078008. %Y A087787 For powers of 2 instead of -1 we have A259401, cf. A259400. %Y A087787 A002865 counts partitions with no ones, column k=0 of A116598. %Y A087787 A072233 counts partitions by sum and length. %Y A087787 Cf. A000009, A003159, A026804, A027187, A027193, A036554, A058695, A101707. %K A087787 nonn %O A087787 0,3 %A A087787 _Vladeta Jovovic_, Oct 07 2003