A052344 Number of ways to write n as the unordered sum of two nonzero triangular numbers.
0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 2, 0, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 1, 2, 0, 0, 1, 0, 1, 1, 1, 1, 0, 0, 2, 1, 0, 0, 2, 0, 1, 1, 0, 2, 0, 0, 0, 1, 2, 1, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, 0, 1, 1, 0, 2, 1, 0, 0, 2, 0, 0, 1, 0, 3, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 2, 0, 0, 1, 0, 1, 1, 1
Offset: 0
Keywords
Links
- T. D. Noe, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Maple
G:= (1/8)*(JacobiTheta2(0, sqrt(q))^2-4*JacobiTheta2(0, sqrt(q))*q^(1/8)+2*JacobiTheta2(0, q))/q^(1/4): S:= series(G,q,1001): seq(coeff(S,q,j),j=0..1000); # Robert Israel, Feb 24 2016
-
Mathematica
nn=150; tri=Accumulate[Range[nn]]; t=Table[0, {tri[[-1]]}]; Do[n=tri[[i]]+tri[[j]]; If[n <= tri[[-1]], t[[n]]++], {i,nn}, {j,i}]; t=Prepend[t,0]
Formula
G.f.: (Theta_2(sqrt(x))^2 - 4*x^(1/8)*Theta_2(sqrt(x)) + 2*Theta_2(x))/(8*x^(1/4)) where Theta_2 is a Jacobi theta function. - Robert Israel, Feb 24 2016
a(n) = Sum_{k=1..n} c(k) * c(2*n-k), where c(n) is the characteristic function of promic numbers (A005369). - Wesley Ivan Hurt, Jun 09 2021
a(n) = Sum_{k=1..floor(n/2)} c(k) * c(n-k), where c = A010054. - Wesley Ivan Hurt, Jan 06 2024
Comments