%I #6 Feb 16 2025 08:33:16
%S 1,1,0,0,1,2,2,2,2,2,3,4,4,4,4,5,6,6,7,8,7,8,10,11,11,12,14,14,15,17,
%T 18,20,21,22,24,25,27,30,31,32,35,37,39,41,44,45,48,52,53,56,60,62,66,
%U 69,72,76,81,86,89,92,96,103,109,113,117,123,127,134
%N Number of partitions of n into distinct terms of (1,4)-Ulam sequence, cf. A003666.
%H Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UlamSequence.html">Ulam Sequence</a>
%H Wikipedia, <a href="http://en.wikipedia.org/wiki/Ulam_number">Ulam number</a>
%H <a href="/index/U#Ulam_num">Index entries for Ulam numbers</a>
%e The first terms of A003666 are 1, 4, 5, 6, 7, 8, 10, 16, 18, 19, ...
%e a(12) = #{8+4, 7+5, 7+4+1, 6+5+1} = 4;
%e a(13) = #{8+5, 8+4+1, 7+6, 7+5+1} = 4;
%e a(14) = #{10+4, 8+6, 8+5+1, 7+6+1} = 4;
%e a(15) = #{10+5, 10+4+1, 8+7, 8+6+1, 6+5+4} = 5;
%e a(16) = #{16, 10+6, 10+5+1, 8+7+1, 7+5+4, 6+5+4+1} = 6.
%o (Haskell)
%o a199121 = p a003666_list where
%o p _ 0 = 1
%o p (u:us) m | m < u =
%o | otherwise = p us (m - u) + p us m
%Y Cf. A000586; A199120, A199017, A199119, A199123.
%K nonn,changed
%O 0,6
%A _Reinhard Zumkeller_, Nov 03 2011