login
The number of partitions of n into parts, so that there exists a part i with multiplicity i.
6

%I #20 Jan 30 2026 21:04:58

%S 0,1,0,1,2,2,3,6,6,11,13,20,24,36,43,61,77,102,128,172,208,276,339,

%T 434,536,681,830,1047,1277,1587,1929,2388,2880,3540,4267,5195,6245,

%U 7571,9052,10925,13028,15630,18588,22214,26318,31332,37030,43892,51739,61137

%N The number of partitions of n into parts, so that there exists a part i with multiplicity i.

%C This sequence was inspired by a puzzle, "IQ Tests," from the book Mathematical Puzzles and Curiosities.

%C Consider a multiple-choice question: "How many correct answer choices are there: (a) 1, (b) 1, (c) 2, (d) 2?" Answer 2 can be considered correct as it appears twice. This sequence counts the number of multiple-choice questions with a total n that contain a 'correct' answer.

%D I. David, T. Khovanova, and Y. Shpilman, Mathematical Puzzles and Curiosities, World Scientific, 2026, p.5.

%H Alois P. Heinz, <a href="/A392745/b392745.txt">Table of n, a(n) for n = 0..10000</a>

%F G.f.: Product_{k>0} 1/(1-x^k) - Product_{k>0} (1/(1-x^k) - x^(k^2)).

%F a(n) = A000041(n) - A276429(n).

%e Consider 5 partitions of 4: (1,1,1,1), (2,1,1), (2,2), (3,1), 4. Only partitions (2,2) and (3,1) satisfy the requirement. In the first case, value 2 appears twice; in the second case, value 1 appears once. Thus, a(5) = 2.

%p b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,

%p add(`if`(i=j, 0, b(n-i*j, i-1)), j=0..n/i)))

%p end:

%p a:= n-> combinat[numbpart](n)-b(n$2):

%p seq(a(n), n=0..50); # _Alois P. Heinz_, Jan 29 2026

%t Table[Total@ Map[Boole@ AnyTrue[Tally[#], SameQ @@ # &] &, IntegerPartitions[n]], {n, 0, 49}] (* _Michael De Vlieger_, Jan 29 2026 *)

%Y Cf. A000041, A276429, A336273.

%K nonn

%O 0,5

%A _Tanya Khovanova_ and PRIMES STEP senior group, Jan 21 2026