%I #23 Nov 28 2020 23:44:53
%S 1,0,0,0,1,0,0,1,0,0,1,1,0,1,1,0,1,2,0,1,2,1,1,3,1,1,3,2,1,4,3,1,4,4,
%T 2,5,5,2,5,7,3,6,8,4,6,10,6,7,12,7,8,14,10,9,16,12,10,19,16,12,21,19,
%U 14,24,24,17,27,28,20,31,35,24,34,40,29,39,48,35
%N Number of partitions of n into distinct parts == 1 (mod 3), with 1 as the smallest part.
%C Also number of partitions of n such that if k is the largest part, then k occurs exactly once and integers from 1 to k-1 occur a positive multiple of 3 times. Example: a(18)=2 because we have [3,2,2,2,1,1,1,1,1,1,1,1,1] and [3,2,2,2,2,2,2,1,1,1]. - _Emeric Deutsch_, Apr 18 2006
%H Alois P. Heinz, <a href="/A092130/b092130.txt">Table of n, a(n) for n = 1..1000</a>
%F G.f.: x*Product_{k>=1} (1+x^(1+3k)). - _Emeric Deutsch_, Apr 18 2006
%F a(n) ~ exp(Pi*sqrt(n)/3) / (2^(7/3) * sqrt(3) * n^(3/4)). - _Vaclav Kotesovec_, Aug 30 2015
%F G.f.: Sum_{k>=1} x^(k*(3*k - 1)/2) / Product_{j=1..k-1} (1 - x^(3*j)). - _Ilya Gutkovskiy_, Nov 28 2020
%e For a(24), we have 19+4+1, 16+7+1, 13+10+1, so a(24)=3.
%p g:=x*product(1+x^(1+3*k),k=1..25): gser:=series(g,x=0,70): seq(coeff(gser,x,n),n=1..51); # _Emeric Deutsch_, Apr 18 2006
%p # second Maple program
%p b:= proc(n, i) option remember;
%p `if`(n=0, 1, `if`(i<2, 0, b(n, i-3)+`if`(i>n, 0, b(n-i, i-3))))
%p end:
%p a:= n-> b(n-1, iquo(n, 3)*3+1):
%p seq (a(n), n=1..100); # _Alois P. Heinz_, May 01 2012
%t b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<2, 0, b[n, i-3] + If[i>n, 0, b[n-i, i-3]]]]; a[n_] := b[n-1, Quotient[n, 3]*3+1]; Table[a[n], {n, 1, 100}] (* _Jean-François Alcover_, May 13 2015, after _Alois P. Heinz_ *)
%o (PARI) for(i=0,50,print1(","polcoeff(prod(k=1,50,(1+x^(3*k+1))),i)))
%Y Cf. A027349.
%K nonn
%O 1,18
%A _Jon Perry_, Mar 30 2004