login
Number of 2's in the last section of the set of partitions of n.
25

%I #56 May 16 2020 01:30:44

%S 0,0,1,0,2,1,4,3,8,7,15,15,27,29,48,53,82,94,137,160,225,265,362,430,

%T 572,683,892,1066,1370,1640,2078,2487,3117,3725,4624,5519,6791,8092,

%U 9885,11752,14263,16922,20416,24167,29007,34254,40921,48213,57345,67409

%N Number of 2's in the last section of the set of partitions of n.

%C Essentially the same as A087787 but here a(n) is the number of 2's in the last section of n, not n-2. See also A100818.

%C Note that a(1)..a(11) coincide with a(2)..a(12) of A005291.

%C Also number of 2's in all partitions of n that do not contain 1's as a part, if n >= 1. Also 0 together with the first differences of A024786. - _Omar E. Pol_, Nov 13 2011

%C Also number of 2's in the n-th section of the set of partitions of any integer >= n. For the definition of "section" see A135010. - _Omar E. Pol_, Dec 01 2013

%H Alois P. Heinz, <a href="/A182712/b182712.txt">Table of n, a(n) for n = 0..1000</a>

%F It appears that A000041(n) = a(n+1) + a(n+2), n >= 0. - _Omar E. Pol_, Feb 04 2012

%F G.f.: (x^2/(1 + x))*Product_{k>=1} 1/(1 - x^k). - _Ilya Gutkovskiy_, Jan 03 2017

%F a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n). - _Vaclav Kotesovec_, Jun 02 2018

%e a(6) = 4 counts the 2's in 6 = 4+2 = 2+2+2. The 2's in 6 = 3+2+1 = 2+2+1+1 = 2+1+1+1+1 do not count. - _Omar E. Pol_, Nov 13 2011

%e From _Omar E. Pol_, Oct 27 2012: (Start)

%e ----------------------------------

%e Last section Number

%e of the set of of

%e partitions of 6 2's

%e ----------------------------------

%e 6 .......................... 0

%e 3 + 3 ...................... 0

%e 4 + 2 ...................... 1

%e 2 + 2 + 2 .................. 3

%e . 1 ...................... 0

%e . 1 .................. 0

%e . 1 .................. 0

%e . 1 .............. 0

%e . 1 .............. 0

%e . 1 .......... 0

%e . 1 ...... 0

%e ---------------------------------

%e . 8 - 4 = 4

%e .

%e In the last section of the set of partitions of 6 the difference between the sum of the second column and the sum of the third column is 8 - 4 = 4, the same as the number of 2's, so a(6) = 4 (see also A024786).

%e (End)

%t Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 2], {n, 0, 49}] (* _Robert Price_, May 15 2020 *)

%o (Sage) A182712 = lambda n: sum(list(p).count(2) for p in Partitions(n) if 1 not in p) # _Omar E. Pol_, Nov 13 2011

%Y Column 2 of A194812.

%Y Cf. A005291, A087787, A100818, A135010, A138121, A182703, A182713, A182714.

%K nonn,easy

%O 0,5

%A _Omar E. Pol_, Nov 28 2010