OFFSET
0,4
COMMENTS
Heegner numbers = A003173(1..9) = {1,2,3,7,11,19,43,67,163};
0 <= a(n) <= 3;
for n > 316: a(n) = 0; 154 = smallest number m such that a(m) = 0;
number of terms greater than 0 = 303;
sum of all terms = 512.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 0..400
Eric Weisstein's World of Mathematics, Heegner Number
Wikipedia, Heegner number
EXAMPLE
a(10) = #{7+3, 7+2+1} = 2;
a(11) = #{11, 7+3+1} = 2;
a(12) = #{11+1, 7+3+2} = 2;
a(13) = #{11+2, 7+3+2+1} = 2;
a(14) = #{11+3, 11+2+1} = 2;
a(15) = #{11+3+1} = 1;
a(16) = #{11+3+2} = 1;
a(17) = #{11+3+2+1} = 1;
a(18) = #{11+7} = 1;
a(19) = #{19, 11+7+1} = 2;
a(20) = #{19+1, 11+7+2} = 2;
a(316) = #{163+67+43+19+11+7+3+2+1} = 1.
MATHEMATICA
heegnerNums = {1, 2, 3, 7, 11, 19, 43, 67, 163};
a[n_] := a[n] = Count[IntegerPartitions[n, All, heegnerNums], P_List /; Sort[P] == Union[P]];
Table[Print[n, " ", a[n]]; a[n], {n, 0, 316}] (* Jean-François Alcover, Jun 10 2019 *)
PROG
(Haskell)
a242217 = p [1, 2, 3, 7, 11, 19, 43, 67, 163] where
p _ 0 = 1
p [] _ = 0
p (k:ks) m = if m < k then 0 else p ks (m - k) + p ks m
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, May 07 2014
STATUS
approved