login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A338585 Number of partitions of the n-th triangular number into exactly n positive triangular numbers. 3
1, 1, 0, 0, 1, 2, 3, 4, 9, 16, 29, 52, 92, 173, 307, 554, 1002, 1792, 3216, 5738, 10149, 17942, 31769, 55684, 97478, 170356, 295644, 512468, 886358, 1523779, 2614547, 4476152, 7627119, 12966642, 21988285, 37142199, 62591912, 105215149, 176266155, 294591431 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,6
LINKS
Eric Weisstein's World of Mathematics, Triangular Number
FORMULA
a(n) = [x^A000217(n) y^n] Product_{j>=1} 1 / (1 - y*x^A000217(j)).
a(n) = A319797(A000217(n),n).
EXAMPLE
The 5th triangular number is 15 and 15 = 1 + 1 + 1 + 6 + 6 = 3 + 3 + 3 + 3 + 3, so a(5) = 2.
MAPLE
h:= proc(n) option remember; `if`(n<1, 0,
`if`(issqr(8*n+1), n, h(n-1)))
end:
b:= proc(n, i, k) option remember; `if`(n=0, `if`(k=0, 1, 0),
`if`(i*k<n or k>n, 0, b(n, h(i-1), k)+b(n-i, h(min(n-i, i)), k-1)))
end:
a:= n-> (t-> b(t, h(t), n))(n*(n+1)/2):
seq(a(n), n=0..42); # Alois P. Heinz, Nov 10 2020
MATHEMATICA
h[n_] := h[n] = If[n < 1, 0, If[IntegerQ@Sqrt[8n+1], n, h[n-1]]];
b[n_, i_, k_] := b[n, i, k] = If[n == 0, If[k == 0, 1, 0], If[i k < n || k > n, 0, b[n, h[i-1], k] + b[n-i, h[Min[n-i, i]], k-1]]];
a[n_] := b[#, h[#], n]&[n(n+1)/2];
a /@ Range[0, 42](* Jean-François Alcover, Nov 15 2020, after Alois P. Heinz *)
PROG
(SageMath) # Returns a list of length n, slow.
def GeneralizedEulerTransform(n, a):
R.<x, y> = ZZ[[]]
f = prod((1 - y*x^a(k) + O(x, y)^a(n)) for k in (1..n))
coeffs = f.inverse().coefficients()
coeff = lambda k: coeffs[x^a(k)*y^k] if x^a(k)*y^k in coeffs else 0
return [coeff(k) for k in range(n)]
def A338585List(n): return GeneralizedEulerTransform(n, lambda n: n*(n+1)/2)
print(A338585List(12)) # Peter Luschny, Nov 12 2020
CROSSREFS
Sequence in context: A281882 A325436 A346777 * A145027 A088275 A274836
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Nov 08 2020
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 26 01:44 EDT 2024. Contains 371989 sequences. (Running on oeis4.)