login
Number of partitions of n into distinct non-triangular numbers, cf. A014132.
3

%I #18 Jan 02 2017 17:45:48

%S 1,0,1,0,1,1,1,2,1,3,1,4,3,5,5,5,7,7,10,10,13,13,16,18,21,25,27,32,33,

%T 41,44,53,57,65,73,81,93,102,118,128,145,159,181,200,224,246,275,304,

%U 337,375,413,460,503,559,614,679,749,821,907,991,1096,1197,1319,1442,1582,1733,1893,2076,2265,2482,2702,2956,3220

%N Number of partitions of n into distinct non-triangular numbers, cf. A014132.

%H Alois P. Heinz and Vaclav Kotesovec, <a href="/A225045/b225045.txt">Table of n, a(n) for n = 0..10000</a> (terms 0..1000 from Alois P. Heinz)

%F G.f.: prod(n>=1, 1 + q^n ) / prod(n>=1, 1 + q^(n*(n+1)/2) ). [_Joerg Arndt_, Apr 01 2014]

%F a(n) ~ exp(Pi*sqrt(n/3) - 3^(1/4) * Zeta(3/2) * n^(1/4) / (2+sqrt(2)) - 3*(3-2*sqrt(2)) * Zeta(3/2)^2 / (16*Pi)) / (2*3^(1/4)*n^(3/4)). - _Vaclav Kotesovec_, Jan 02 2017

%e a(10) = #{8+2} = 1;

%e a(11) = #{11, 9+2, 7+4, 5+4+2} = 4;

%e a(12) = #{12, 8+4, 7+5} = 3;

%e a(13) = #{13, 11+2, 9+4, 8+5, 7+4+2} = 5.

%p b:= proc(n, i) option remember; `if`(n>i*(i+1)/2, 0,

%p `if`(n=0, 1, add(b(n-i*j, i-1), j=0..min(n/i,

%p `if`(issqr(8*i+1), 0, 1)))))

%p end:

%p a:= n-> b(n$2):

%p seq(a(n), n=0..80); # _Alois P. Heinz_, Apr 01 2014

%t b[n_, i_] := b[n, i] = If[n > i*(i+1)/2, 0, If[n==0, 1, Sum[b[n-i*j, i-1], {j, 0, Min[n/i, If[IntegerQ[Sqrt[8*i+1]], 0, 1]]}]]]; a[n_] := b[n, n]; Table[a[n], {n, 0, 80}] (* _Jean-François Alcover_, Jan 15 2016, after _Alois P. Heinz_ *)

%o (Haskell)

%o a225045 = p a014132_list where

%o p _ 0 = 1

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

%o (PARI) N=66; q='q+O('q^N); Vec( prod(n=1,N, 1 + q^n) / prod(n=1,N, 1 + q^(n*(n+1)/2)) ) \\ _Joerg Arndt_, Apr 01 2014

%Y Cf. A000009, A024940, A225044, A087154.

%K nonn

%O 0,8

%A _Reinhard Zumkeller_, Apr 25 2013