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.

Previous Showing 11-15 of 15 results.

A338585 Number of partitions of the n-th triangular number into exactly n positive triangular numbers.

Original entry on oeis.org

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
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 08 2020

Keywords

Examples

			The 5th triangular number is 15 and 15 = 1 + 1 + 1 + 6 + 6 = 3 + 3 + 3 + 3 + 3, so a(5) = 2.
		

Crossrefs

Programs

  • 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*kn, 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 *)
  • SageMath
    # Returns a list of length n, slow.
    def GeneralizedEulerTransform(n, a):
        R. = 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

Formula

a(n) = [x^A000217(n) y^n] Product_{j>=1} 1 / (1 - y*x^A000217(j)).
a(n) = A319797(A000217(n),n).

A299031 Number of ordered ways of writing n-th triangular number as a sum of n squares of nonnegative integers.

Original entry on oeis.org

1, 1, 0, 3, 18, 60, 252, 1576, 10494, 64152, 458400, 3407019, 27713928, 225193982, 1980444648, 17626414158, 165796077562, 1593587604441, 15985672426992, 163422639872978, 1729188245991060, 18743981599820280, 208963405365941380, 2378065667103672024, 27742569814633730608
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 01 2018

Keywords

Examples

			a(3) = 3 because third triangular number is 6 and we have [4, 1, 1], [1, 4, 1] and [1, 1, 4].
		

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[(1 + EllipticTheta[3, 0, x])^n/2^n, {x, 0, n (n + 1)/2}], {n, 0, 24}]

Formula

a(n) = [x^(n*(n+1)/2)] (Sum_{k>=0} x^(k^2))^n.

A331900 Number of compositions (ordered partitions) of the n-th triangular number into distinct triangular numbers.

Original entry on oeis.org

1, 1, 1, 1, 7, 1, 3, 13, 3, 55, 201, 159, 865, 1803, 7093, 43431, 14253, 22903, 130851, 120763, 1099693, 4527293, 4976767, 7516897, 14349685, 72866239, 81946383, 167841291, 897853735, 455799253, 946267825, 5054280915, 3941268001, 17066300985, 49111862599
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 31 2020

Keywords

Examples

			a(6) = 3 because we have [21], [15, 6] and [6, 15].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; (t->
          `if`(t*(i+2)/3n, 0, b(n-t, i-1, p+1)))))((i*(i+1)/2))
        end:
    a:= n-> b(n*(n+1)/2, n, 0):
    seq(a(n), n=0..37);  # Alois P. Heinz, Jan 31 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = With[{t = i(i+1)/2}, If[t(i+2)/3 < n, 0, If[n == 0, p!, b[n, i-1, p] + If[t > n, 0, b[n-t, i-1, p+1]]]]];
    a[n_] := b[n(n+1)/2, n, 0];
    a /@ Range[0, 37] (* Jean-François Alcover, Nov 17 2020, after Alois P. Heinz *)

Formula

a(n) = A331843(A000217(n)).

Extensions

More terms from Alois P. Heinz, Jan 31 2020

A114738 Triangle read by rows: row n lists partitions of n-th triangular number into triangular parts.

Original entry on oeis.org

1, 3, 111, 6, 33, 3111, 111111, 10, 631, 61111, 3331, 331111, 31111111, 1111111111, 15, 10311, 1011111, 663, 66111, 6333, 633111, 63111111, 6111111111, 33333, 3333111, 333111111, 33111111111, 3111111111111, 111111111111111, 21, 156
Offset: 1

Views

Author

Amarnath Murthy, Nov 15 2005

Keywords

Examples

			1
3,111
6,33,3111,111111
10,631,61111,3331,331111,31111111,1111111111
15,10311,1011111,663,66111,6333,633111,63111111,6111111111,33333,3333111,333111111,33111111111,3111111111111,111111111111111.
...
		

Crossrefs

Cf. A072964.

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.

Original entry on oeis.org

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

Views

Author

Luc Rousseau, Feb 27 2019

Keywords

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.

Examples

			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.
		

Crossrefs

Programs

  • 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]]]
Previous Showing 11-15 of 15 results.