A224823 Number of solutions to n = x + y + 3*z where x, y, z are triangular numbers.
1, 2, 1, 3, 4, 1, 5, 4, 0, 6, 6, 3, 5, 6, 2, 6, 8, 0, 7, 8, 4, 9, 6, 1, 11, 10, 0, 8, 6, 5, 9, 12, 3, 7, 14, 0, 11, 8, 5, 13, 10, 4, 8, 8, 0, 14, 16, 5, 11, 12, 1, 16, 10, 0, 14, 14, 7, 9, 12, 5, 14, 14, 0, 7, 16, 7, 18, 14, 4, 19, 10, 0, 12, 16, 9, 13, 20, 0
Offset: 0
Keywords
Examples
G.f. = 1 + 2*x + x^2 + 3*x^3 + 4*x^4 + x^5 + 5*x^6 + 4*x^7 + 6*x^9 + 6*x^10 + ... G.f. = q^5 + 2*q^13 + q^21 + 3*q^29 + 4*q^37 + q^45 + 5*q^53 + 4*q^61 + 6*q^77 + ... a(3) = 3 since 3 = 0 + 0 + 3*1 = 0 + 3 + 3*0 = 3 + 0 + 3*0 are the 3 solutions of 3 = x + y + 3*z in triangular numbers. a(4) = 4 since 4 = 1 + 0 + 3*1 = 0 + 1 + 3*1 = 3 + 1 + 3*0 = 1 + 3 + 3*0 are the 4 solutions of 4 = x + y + 3*z in triangular numbers.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 0..10000
- Michael Somos, Introduction to Ramanujan theta functions
- Eric Weisstein's World of Mathematics, Ramanujan Theta Functions
Programs
-
Haskell
a224823 n = length [() | let ts = takeWhile (<= n) a000217_list, x <- ts, y <- ts, z <- takeWhile (<= div (n - x - y) 3) ts, x + y + 3 * z == n] -- Reinhard Zumkeller, Jul 21 2013
-
Mathematica
a[ n_] := SeriesCoefficient[ EllipticTheta[ 2, 0, x^(1/2)]^2 EllipticTheta[ 2, 0, x^(3/2)] / (8 x^(5/8)), {x, 0, n}];
-
PARI
{a(n) = local(A); if( n<0, 0, A = x * O(x^n); polcoeff( eta(x^2 + A)^4 * eta(x^6 + A)^2 / (eta(x + A)^2 * eta(x^3 + A)), n))};
Formula
Expansion of psi(x)^2 * psi(x^3) in powers of x where psi() is a Ramanujan theta function.
Expansion of q^(-5/8) * eta(q^2)^4 * eta(q^6)^2 / (eta(q)^2 * eta(q^3)) in powers of q.
Euler transform of period 6 sequence [ 2, -2, 3, -2, 2, -3, ...].
G.f.: (Sum_{k>0} x^((k^2-k)/2))^2 * (Sum_{k>0} x^(3 * (k^2-k)/2)).
-2 * a(n) = A227595(3*n + 1).
Comments