login
A306597
a(n) = Card({ Sum_{k=1..n}(x_k * k) : (x_k)_{k=1..n} is an n-tuple of nonnegative integers such that Sum_{k=1..n}(x_k * T_k) = T_n }), where T_k denotes the k-th triangular number.
1
1, 2, 4, 6, 9, 15, 20, 27, 34, 43, 52, 63, 75, 87, 102, 117, 132, 149, 166, 185, 206, 226, 248, 271, 294, 318, 345, 373, 399, 429, 459, 489, 520, 554, 587, 623, 658, 695, 734, 772, 811, 853, 894, 936, 981, 1026, 1072, 1119, 1167, 1215, 1266, 1316, 1368, 1420
OFFSET
1,2
COMMENTS
Inspired by the questions:
- Q1: into how many regions do n+1 straight lines divide the plane?
- Q2: what is the number of possible answers to Q1?
This sequence provides an answer to an analog of Q2 in a modified version of the problem.
Also an analog of A069999(n) with the roles of k and T_k swapped in the definition.
LINKS
Luc Rousseau, C program
Luc Rousseau, Java program (standalone version)
Luc Rousseau, Java program (jOEIS version, github)
EXAMPLE
When n = 3, n*(n+1)/2 = 6. All possible ways to partition 6 into parts with triangular sizes (1, 3, 6) are:
0*1 + 0*3 + 1*6 = 6
0*1 + 2*3 + 0*6 = 6
3*1 + 1*3 + 0*6 = 6
6*1 + 0*3 + 0*6 = 6
In the above products, keep the left multiplicands and replace the right ones with their triangular roots:
0*1 + 0*2 + 1*3 = 3
0*1 + 2*2 + 0*3 = 4
3*1 + 1*2 + 0*3 = 5
6*1 + 0*2 + 0*3 = 6
Card({ 3, 4, 5, 6 }) = 4, so a(3) = 4.
MATHEMATICA
T[n_] := n*(n + 1)/2
R[n_] := (Sqrt[8*n + 1] - 1)/2
S[0] := 0
S[d_] := S[d] =
Module[{r = R[d]},
If[IntegerQ[r], r++; r + T[r],
First@TakeSmallest[
1]@(S[#[[1]]] + S[#[[2]]] & /@ IntegerPartitions[d, {2}])]]
A0[n_] := Sum[Boole[d + S[d] <= 2*n], {d, 0, n}]
A[n_] := A0[T[n]]
For[n = 1, n <= 150, n++, Print[n, " ", A[n]]]
CROSSREFS
KEYWORD
nonn
AUTHOR
Luc Rousseau, Feb 27 2019
STATUS
approved