A182722 a(n) = A005291(n+1)-A182712(n).
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 3, 5, 10, 14, 26, 36, 60, 83, 128, 175, 261, 351, 504, 674, 943, 1247, 1711, 2243
Offset: 0
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.
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)
Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 2], {n, 0, 49}] (* Robert Price, May 15 2020 *)
A182712 = lambda n: sum(list(p).count(2) for p in Partitions(n) if 1 not in p) # Omar E. Pol, Nov 13 2011
Triangle begins: 1, -1,1, 0,0,1, 0,1,0,1, 1,0,2,0,1, 0,2,1,2,0,1, 2,1,3,2,2,0,1, 0,4,3,4,2,2,0,1, 3,3,7,4,5,2,2,0,1, 1,8,6,10,5,5,2,2,0,1, 5,7,14,10,11,6,5,2,2,0,1, 2,15,15,19,13,12,6,5,2,2,0,1, 10,15,26,23,24,14,13,6,5,2,2,0,1, 5,28,31,38,29,27,15,13,6,5,2,2,0,1, 16,30,51,47,48,34,28,16,13,6,5,2,2,0,1, ...
Comments