A182712 Number of 2's in the last section of the set of partitions of n.
0, 0, 1, 0, 2, 1, 4, 3, 8, 7, 15, 15, 27, 29, 48, 53, 82, 94, 137, 160, 225, 265, 362, 430, 572, 683, 892, 1066, 1370, 1640, 2078, 2487, 3117, 3725, 4624, 5519, 6791, 8092, 9885, 11752, 14263, 16922, 20416, 24167, 29007, 34254, 40921, 48213, 57345, 67409
Offset: 0
Examples
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 From _Omar E. Pol_, Oct 27 2012: (Start) ---------------------------------- Last section Number of the set of of partitions of 6 2's ---------------------------------- 6 .......................... 0 3 + 3 ...................... 0 4 + 2 ...................... 1 2 + 2 + 2 .................. 3 . 1 ...................... 0 . 1 .................. 0 . 1 .................. 0 . 1 .............. 0 . 1 .............. 0 . 1 .......... 0 . 1 ...... 0 --------------------------------- . 8 - 4 = 4 . 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). (End)
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Mathematica
Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 2], {n, 0, 49}] (* Robert Price, May 15 2020 *)
-
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
Formula
It appears that A000041(n) = a(n+1) + a(n+2), n >= 0. - Omar E. Pol, Feb 04 2012
G.f.: (x^2/(1 + x))*Product_{k>=1} 1/(1 - x^k). - Ilya Gutkovskiy, Jan 03 2017
a(n) ~ exp(Pi*sqrt(2*n/3)) / (8*sqrt(3)*n). - Vaclav Kotesovec, Jun 02 2018
Comments