OFFSET
0,5
COMMENTS
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.
Note that a(1)..a(11) coincide with a(2)..a(12) of A005291.
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
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
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
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
EXAMPLE
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)
MATHEMATICA
Table[Count[Flatten@Cases[IntegerPartitions[n], x_ /; Last[x] != 1], 2], {n, 0, 49}] (* Robert Price, May 15 2020 *)
PROG
(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
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Omar E. Pol, Nov 28 2010
STATUS
approved