cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A306597 a(n) = Card({ Sum_{k=1..n}(x_k * k) : (x_k){k=1..n}</span> is an n-tuple of nonnegative integers such that <span class="maths">Sum{k=1..n}(x_k * T_k) = T_n }), where T_k denotes the k-th triangular number.

This page as a plain text file.
%I A306597 #41 Jul 23 2019 08:53:21
%S A306597 1,2,4,6,9,15,20,27,34,43,52,63,75,87,102,117,132,149,166,185,206,226,
%T A306597 248,271,294,318,345,373,399,429,459,489,520,554,587,623,658,695,734,
%U A306597 772,811,853,894,936,981,1026,1072,1119,1167,1215,1266,1316,1368,1420
%N 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.
%C A306597 Inspired by the questions:
%C A306597 - Q1: into how many regions do n+1 straight lines divide the plane?
%C A306597 - Q2: what is the number of possible answers to Q1?
%C A306597 This sequence provides an answer to an analog of Q2 in a modified version of the problem.
%C A306597 Also an analog of A069999(n) with the roles of k and T_k swapped in the definition.
%H A306597 Luc Rousseau, <a href="/A306597/b306597.txt">Table of n, a(n) for n = 1..150</a>
%H A306597 Luc Rousseau, <a href="/A306597/a306597.c.txt">C program</a>
%H A306597 Luc Rousseau, <a href="/A306597/a306597.java.txt">Java program</a> (standalone version)
%H A306597 Luc Rousseau, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a306/A306597.java">Java program</a> (jOEIS version, github)
%e A306597 When n = 3, n*(n+1)/2 = 6. All possible ways to partition 6 into parts with triangular sizes (1, 3, 6) are:
%e A306597   0*1 + 0*3 + 1*6 = 6
%e A306597   0*1 + 2*3 + 0*6 = 6
%e A306597   3*1 + 1*3 + 0*6 = 6
%e A306597   6*1 + 0*3 + 0*6 = 6
%e A306597 In the above products, keep the left multiplicands and replace the right ones with their triangular roots:
%e A306597   0*1 + 0*2 + 1*3 = 3
%e A306597   0*1 + 2*2 + 0*3 = 4
%e A306597   3*1 + 1*2 + 0*3 = 5
%e A306597   6*1 + 0*2 + 0*3 = 6
%e A306597 Card({ 3, 4, 5, 6 }) = 4, so a(3) = 4.
%t A306597 T[n_] := n*(n + 1)/2
%t A306597 R[n_] := (Sqrt[8*n + 1] - 1)/2
%t A306597 S[0] := 0
%t A306597 S[d_] := S[d] =
%t A306597   Module[{r = R[d]},
%t A306597    If[IntegerQ[r], r++; r + T[r],
%t A306597     First@TakeSmallest[
%t A306597        1]@(S[#[[1]]] + S[#[[2]]] & /@ IntegerPartitions[d, {2}])]]
%t A306597 A0[n_] := Sum[Boole[d + S[d] <= 2*n], {d, 0, n}]
%t A306597 A[n_] := A0[T[n]]
%t A306597 For[n = 1, n <= 150, n++, Print[n, " ", A[n]]]
%Y A306597 Cf. A177862, A072964, A069999.
%K A306597 nonn
%O A306597 1,2
%A A306597 _Luc Rousseau_, Feb 27 2019