login
Number of partitions of n into distinct Heegner numbers, cf. A003173.
2

%I #8 Jun 10 2019 10:13:34

%S 1,1,1,2,1,1,1,1,1,1,2,2,2,2,2,1,1,1,1,2,2,3,3,2,2,1,1,1,1,2,2,2,2,2,

%T 1,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,1,1,2,2,2,2,2,1,1,1,1,2,2,3,3,2,3,

%U 2,2,3,2,3,3,3,3,3,3,3,3,3,3,2,3,2,2,3

%N Number of partitions of n into distinct Heegner numbers, cf. A003173.

%C Heegner numbers = A003173(1..9) = {1,2,3,7,11,19,43,67,163};

%C 0 <= a(n) <= 3;

%C for n > 316: a(n) = 0; 154 = smallest number m such that a(m) = 0;

%C number of terms greater than 0 = 303;

%C sum of all terms = 512.

%H Reinhard Zumkeller, <a href="/A242217/b242217.txt">Table of n, a(n) for n = 0..400</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/HeegnerNumber.html">Heegner Number</a>

%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Heegner_number">Heegner number</a>

%e a(10) = #{7+3, 7+2+1} = 2;

%e a(11) = #{11, 7+3+1} = 2;

%e a(12) = #{11+1, 7+3+2} = 2;

%e a(13) = #{11+2, 7+3+2+1} = 2;

%e a(14) = #{11+3, 11+2+1} = 2;

%e a(15) = #{11+3+1} = 1;

%e a(16) = #{11+3+2} = 1;

%e a(17) = #{11+3+2+1} = 1;

%e a(18) = #{11+7} = 1;

%e a(19) = #{19, 11+7+1} = 2;

%e a(20) = #{19+1, 11+7+2} = 2;

%e a(316) = #{163+67+43+19+11+7+3+2+1} = 1.

%t heegnerNums = {1,2,3,7,11,19,43,67,163};

%t a[n_] := a[n] = Count[IntegerPartitions[n, All, heegnerNums], P_List /; Sort[P] == Union[P]];

%t Table[Print[n," ", a[n]]; a[n], {n,0,316}] (* _Jean-François Alcover_, Jun 10 2019 *)

%o (Haskell)

%o a242217 = p [1,2,3,7,11,19,43,67,163] where

%o p _ 0 = 1

%o p [] _ = 0

%o p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m

%Y Cf. A242216.

%K nonn

%O 0,4

%A _Reinhard Zumkeller_, May 07 2014