Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #16 Jan 15 2018 23:35:55
%S 1,1,1,2,1,2,2,1,2,2,2,2,2,1,2,3,2,3,3,2,3,2,1,2,2,3,3,4,4,4,6,4,5,5,
%T 4,5,4,4,3,4,4,4,6,5,5,7,5,5,6,4,6,6,6,6,7,7,6,8,5,6,7,5,6,5,4,4,4,4,
%U 4,5,6,5,7,6,5,9,7,8,9,7,8,9,8,7,10,8,9,11
%N Number of partitions of n into distinct parts of the form 3^a*5^b or 2.
%H Joseph Myers and Reinhard Zumkeller, <a href="/A264998/b264998.txt">Table of n, a(n) for n = 0..20000</a> (first 1000 terms from Joseph Myers)
%H British Mathematical Olympiad 2015/16, <a href="http://www.bmoc.maths.org/home/bmo1-2016.pdf">Olympiad Round 1, Problem 6</a>, Friday, 27 November 2015.
%F G.f.: (1+x)(1+x^2)(1+x^3)(1+x^5)(1+x^9)(1+x^15)....
%e 15 = 15 = 9 + 5 + 1 = 9 + 3 + 2 + 1, so a(15) = 3.
%t nmax = 100; A003593 = Select[Range[nmax], PowerMod[15, #, #] == 0 &]; CoefficientList[Series[(1 + x^2) * Product[(1 + x^(A003593[[k]])), {k, 1, Length[A003593]}], {x, 0, nmax}], x] (* _Vaclav Kotesovec_, Dec 18 2015 *)
%o (Haskell)
%o import Data.MemoCombinators (memo2, list, integral)
%o a264998 n = a264998_list !! (n-1)
%o a264998_list = f 0 [] (1 : 2 : tail a003593_list) where
%o f u vs ws'@(w:ws) | u < w = (p' vs u) : f (u + 1) vs ws'
%o | otherwise = f u (vs ++ [w]) ws
%o p' = memo2 (list integral) integral p
%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
%o -- _Reinhard Zumkeller_, Dec 18 2015
%Y Cf. A003593, A264997.
%K easy,nonn
%O 0,4
%A _Joseph Myers_, Nov 29 2015