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, Table of n, a(n) for n = 1..150
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