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.

Showing 1-5 of 5 results.

A319797 Number T(n,k) of partitions of n into exactly k positive triangular numbers; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 28 2018

Keywords

Comments

Equals A181506 when the first column is removed. - Georg Fischer, Jul 26 2023

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 1, 0, 1;
  0, 0, 1, 0, 1;
  0, 0, 0, 1, 0, 1;
  0, 1, 1, 0, 1, 0, 1;
  0, 0, 1, 1, 0, 1, 0, 1;
  0, 0, 0, 1, 1, 0, 1, 0, 1;
  0, 0, 1, 1, 1, 1, 0, 1, 0, 1;
  0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1;
  0, 0, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1;
  0, 0, 1, 2, 1, 1, 1, 1, 1, 0, 1, 0, 1;
		

Crossrefs

Columns k=0-10 give: A000007, A010054 (for n>0), A052344, A063993, A319814, A319815, A319816, A319817, A319818, A319819, A319820.
Row sums give A007294.
T(2n,n) gives A319799.

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) option remember; `if`(n=0 or i=1, x^n,
          b(n, h(i-1))+expand(x*b(n-i, h(min(n-i, i)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, h(n))):
    seq(T(n), n=0..20);
  • Mathematica
    h[n_] := h[n] = If[n < 1, 0, If[IntegerQ @ Sqrt[8*n + 1], n, h[n - 1]]];
    b[n_, i_] := b[n, i] = If[n == 0 || i == 1, x^n, b[n, h[i - 1]] + Expand[ x*b[n - i, h[Min[n - i, i]]]]];
    T[n_] := Table[Coefficient[#, x, i], {i, 0, n}]& @ b[n, h[n]];
    Table[T[n], {n, 0, 20}] // Flatten (* Jean-François Alcover, May 27 2019, after Alois P. Heinz *)

Formula

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

A111178 Number of partitions of n into positive numbers one less than a square.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 2, 1, 1, 2, 1, 1, 2, 1, 2, 4, 1, 2, 4, 1, 2, 5, 2, 4, 5, 2, 5, 5, 2, 6, 7, 4, 6, 7, 5, 6, 8, 6, 8, 12, 6, 9, 13, 6, 10, 15, 8, 14, 15, 9, 16, 16, 10, 18, 21, 14, 19, 22, 16, 20, 24, 19, 25, 30, 20, 27, 33, 21, 29, 39, 26, 37, 40, 28, 42, 42, 31, 48
Offset: 0

Views

Author

Wouter Meeussen, Oct 22 2005

Keywords

Comments

Also limiting form of the number of representations of n into k positive squares for k decreasing from n to 1, or Table[Count[SumOfSquaresRepresentations[k,n], {a_,}/;a>0], {n,100,100}, {k,100,40,-1}]. (Franklin T. Adams-Watters: replacing k^2 ones by the value k^2 changes the count by k^2-1).
a(n) = A243148(2n,n). - Alois P. Heinz, May 30 2014

Crossrefs

Programs

  • Haskell
    a111178 = p $ tail a005563_list where
       p _          0 = 1
       p ks'@(k:ks) m = if m < k then 0 else p ks' (m - k) + p ks m
    -- Reinhard Zumkeller, Apr 02 2014
  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, `if`(i<2, 0, b(n, i-1)+
          `if`(i^2>n+1, 0, b(n+1-i^2, i))))
        end:
    a:= n-> b(n, isqrt(n)):
    seq(a(n), n=0..100);  # Alois P. Heinz, May 30 2014
  • Mathematica
    nn = 100; CoefficientList[Series[Product[1/(1 - x^(k^2 - 1)), {k, 2, nn}], {x, 0, nn}], x] (* corrected by T. D. Noe, Feb 22 2012 *)
    b[n_, i_] := b[n, i] = If[n==0, 1, If[i<2, 0, b[n, i-1] + If[i^2>n+1, 0, b[n+1-i^2, i]]]]; a[n_] := b[n, Round[Sqrt[n]]]; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)

Formula

G.f.: Product_{k>=2} 1/(1-x^(k^2-1)).

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).

A338465 Number of ways to write 2*n as an ordered sum of n nonzero triangular numbers.

Original entry on oeis.org

1, 0, 2, 0, 6, 5, 20, 42, 70, 261, 297, 1430, 1584, 7293, 9634, 35945, 60150, 176596, 366401, 886977, 2150421, 4624410, 12205074, 25065216, 67616872, 139894305, 369551925, 793214982, 2011977414, 4517758504, 10992821055, 25669627965, 60531471286, 145112506352
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 31 2021

Keywords

Comments

Also number of ways to write n as an ordered sum of n nonnegative numbers one less than a triangular number.

Crossrefs

Programs

  • Mathematica
    Table[SeriesCoefficient[(EllipticTheta[2, 0, Sqrt[x]]/(2 x^(1/8)) - 1)^n, {x, 0, 2 n}], {n, 0, 33}]

Formula

a(n) = [x^(2*n)] (theta_2(sqrt(x)) / (2 * x^(1/8)) - 1)^n, where theta_2() is the Jacobi theta function.
a(n) = [x^n] (Sum_{k>=0} x^(k*(k + 3)/2))^n.

A341773 Number of partitions of 2*n into exactly n nonzero tetrahedral numbers.

Original entry on oeis.org

1, 0, 0, 1, 0, 0, 1, 0, 0, 2, 0, 0, 2, 0, 0, 2, 0, 0, 3, 1, 0, 3, 1, 0, 3, 1, 0, 4, 2, 0, 4, 2, 0, 4, 3, 0, 5, 4, 1, 5, 4, 1, 5, 5, 1, 6, 6, 2, 6, 6, 2, 6, 7, 3, 7, 9, 4, 8, 9, 4, 8, 10, 5, 9, 12, 6, 10, 12, 7, 10, 13, 8, 12, 15, 10, 13, 16, 11, 13, 17, 12
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 19 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 80; CoefficientList[Series[Product[1/(1 - x^(Binomial[k + 4, 3] - 1)), {k, 0, nmax}], {x, 0, nmax}], x]

Formula

G.f.: Product_{k>=0} 1 / (1 - x^(binomial(k+4,3)-1)).
Showing 1-5 of 5 results.