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.

A243148 Triangle read by rows: T(n,k) = number of partitions of n into k nonzero squares; n >= 0, 0 <= k <= n.

Original entry on oeis.org

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

Views

Author

Alois P. Heinz, May 30 2014

Keywords

Examples

			T(20,5) = 2 = #{ (16,1,1,1,1), (4,4,4,4,4) } since 20 = 4^2 + 4 * 1^2 = 5 * 2^2.
Triangle T(n,k) begins:
  1;
  0, 1;
  0, 0, 1;
  0, 0, 0, 1;
  0, 1, 0, 0, 1;
  0, 0, 1, 0, 0, 1;
  0, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 0, 1, 0, 0, 1;
  0, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1;
  (...)
		

Crossrefs

Columns k = 0..10 give: A000007, A010052 (for n>0), A025426, A025427, A025428, A025429, A025430, A025431, A025432, A025433, A025434.
Row sums give A001156.
T(2n,n) gives A111178.
T(n^2,n) gives A319435.
T(n,k) = 1 for n in A025284, A025321, A025357, A294675, A295670, A295797 (for k = 2..7, respectively).

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
          `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(i^2>n, 0, b(n-i^2, i, t-1))))
        end:
    T:= (n, k)-> b(n, isqrt(n), k):
    seq(seq(T(n, k), k=0..n), n=0..14);
    # second Maple program:
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+(s-> `if`(s>n, 0, expand(x*b(n-s, i))))(i^2)))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, isqrt(n))):
    seq(T(n), n=0..14);  # Alois P. Heinz, Oct 30 2021
  • Mathematica
    b[n_, i_, k_, t_] := b[n, i, k, t] = If[n == 0, If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i-1, k, t] + If[i^2 > n, 0, b[n-i^2, i, k, t-1]]]]; T[n_, k_] := b[n, Sqrt[n] // Floor, k, k]; Table[Table[T[n, k], {k, 0, n}], {n, 0, 14}] // Flatten (* Jean-François Alcover, Jun 06 2014, after Alois P. Heinz *)
    T[n_, k_] := Count[PowersRepresentations[n, k, 2], r_ /; FreeQ[r, 0]]; T[0, 0] = 1; Table[T[n, k], {n, 0, 14}, {k, 0, n}] // Flatten (* Jean-François Alcover, Feb 19 2016 *)
  • PARI
    T(n,k,L=n)=if(n>k*L^2, 0, k>n-3, k==n, k<2, issquare(n,&n) && n<=L*k, k>n-6, n-k==3, L=min(L,sqrtint(n-k+1)); sum(r=0,min(n\L^2,k-1),T(n-r*L^2,k-r,L-1), n==k*L^2)) \\ M. F. Hasler, Aug 03 2020

Formula

T(n,k) = [x^n y^k] 1/Product_{j>=1} (1-y*x^A000290(j)).
Sum_{k=1..n} k * T(n,k) = A281541(n).
Sum_{k=1..n} n * T(n,k) = A276559(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A292520(n).

A307643 Number of partitions of n^3 into exactly n positive cubes.

Original entry on oeis.org

1, 1, 0, 0, 0, 0, 1, 0, 2, 6, 14, 23, 51, 108, 228, 511, 1158, 2500, 5603, 12304, 26969, 59222, 130115, 285370, 624965, 1368603, 2987117, 6517822, 14187920, 30823278, 66834822, 144671698, 312551894, 673913968, 1450292087, 3114720013, 6676277754, 14281662079
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 19 2019

Keywords

Examples

			9^3 =
1^3 + 1^3 + 1^3 + 2^3 + 3^3 + 3^3 + 3^3 + 5^3 + 8^3 =
1^3 + 1^3 + 2^3 + 4^3 + 4^3 + 5^3 + 5^3 + 5^3 + 6^3 =
1^3 + 1^3 + 4^3 + 4^3 + 4^3 + 4^3 + 4^3 + 4^3 + 7^3 =
1^3 + 2^3 + 2^3 + 3^3 + 4^3 + 4^3 + 5^3 + 6^3 + 6^3 =
1^3 + 3^3 + 3^3 + 3^3 + 3^3 + 3^3 + 5^3 + 5^3 + 7^3 =
2^3 + 3^3 + 3^3 + 3^3 + 3^3 + 3^3 + 3^3 + 6^3 + 7^3,
so a(9) = 6.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, t) option remember; `if`(n=0, `if`(t=0, 1, 0),
          `if`(i<1 or t<1, 0, b(n, i-1, t)+
          `if`(i^3>n, 0, b(n-i^3, i, t-1))))
        end:
    a:= n-> b(n^3, n$2):
    seq(a(n), n=0..25);  # Alois P. Heinz, Oct 12 2019
  • Mathematica
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, If[t == 0, 1, 0], If[i < 1 || t < 1, 0, b[n, i - 1, t] + If[i^3 > n, 0, b[n - i^3, i, t - 1]]]];
    a[n_] := b[n^3, n, n];
    a /@ Range[0, 25] (* Jean-François Alcover, Nov 07 2020, after Alois P. Heinz *)

Formula

a(n) = A320841(n^3,n).

Extensions

More terms from Vaclav Kotesovec, Apr 20 2019

A319503 Number of partitions of Fibonacci(n) into exactly n positive Fibonacci numbers.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 2, 6, 16, 43, 117, 305, 769, 1907, 4686, 11587, 28580, 70451, 172880, 423629, 1036332, 2533559, 6186635, 15092985, 36784586, 89590410, 218069921, 530551804, 1290218120, 3136385254, 7621522229, 18515039477, 44966884766, 109184448962
Offset: 0

Views

Author

Alois P. Heinz, Sep 20 2018

Keywords

Examples

			a(0) = 1: the empty partition.
a(1) = 1: 1.
a(5) = 1: 11111.
a(6) = 2: 221111, 311111.
a(7) = 6: 2222221, 3222211, 3322111, 3331111, 5221111, 5311111.
		

Crossrefs

Programs

  • Mathematica
    (* Program not suitable for a large number of terms. *)
    a[n_] := a[n] = If[n < 2, 1, IntegerPartitions[Fibonacci[n], {n}, Fibonacci[Range[2, n - 1]]] //Length];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 24}] (* Jean-François Alcover, Dec 08 2020 *)

Formula

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

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

A307644 Number of partitions of n^4 into exactly n nonzero fourth powers.

Original entry on oeis.org

1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 3, 0, 6, 0, 27, 13, 59, 390, 661, 4933, 9760, 49415, 101967, 341887, 702884, 2209559, 5361004, 15472531, 34165997, 82258594, 193682533, 490404772, 1210929426, 2725005202, 6283337761, 13672859806, 34906926846
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 19 2019

Keywords

Examples

			11^4 =
1^4 + 2^4 + 2^4 + 4^4 + 4^4 + 4^4 + 4^4 + 6^4 + 8^4 + 8^4 + 8^4 =
2^4 + 2^4 + 2^4 + 2^4 + 2^4 + 2^4 + 6^4 + 6^4 + 6^4 + 8^4 + 9^4 =
2^4 + 2^4 + 2^4 + 4^4 + 6^4 + 6^4 + 6^4 + 6^4 + 6^4 + 6^4 + 9^4,
so a(11) = 3.
		

Crossrefs

Extensions

a(20)-a(28) from Vaclav Kotesovec, Apr 20 2019
a(29)-a(37) from Vaclav Kotesovec, Apr 23 2019
Showing 1-5 of 5 results.