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-3 of 3 results.

A339417 Number of compositions (ordered partitions) of n into an odd number of triangular numbers.

Original entry on oeis.org

0, 1, 0, 2, 0, 4, 1, 9, 3, 19, 12, 41, 33, 91, 92, 203, 238, 466, 602, 1080, 1493, 2536, 3661, 6001, 8902, 14278, 21554, 34094, 52013, 81602, 125297, 195582, 301475, 469193, 724881, 1126161, 1742206, 2703888, 4186276, 6493192, 10057553, 15594636, 24161364, 37455851
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(8) = 3 because we have [6, 1, 1], [1, 6, 1] and [1, 1, 6].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; local r, f, g;
          if n=0 then t else r, f, g:=$0..2; while f<=n
          do r, f, g:= r+b(n-f, 1-t), f+g, g+1 od; r fi
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 43; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(k (k + 1)/2), {k, 1, nmax}]) - 1/Sum[x^(k (k + 1)/2), {k, 0, nmax}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^(k*(k + 1)/2)) - 1 / Sum_{k>=0} x^(k*(k + 1)/2)).
a(n) = (A023361(n) - A106507(n)) / 2.
a(n) = -Sum_{k=0..n-1} A023361(k) * A106507(n-k).

A339418 Number of compositions (ordered partitions) of n into an even number of squares.

Original entry on oeis.org

1, 0, 1, 0, 1, 2, 1, 4, 2, 6, 9, 8, 20, 16, 35, 44, 55, 102, 105, 196, 242, 344, 540, 652, 1084, 1380, 2037, 2964, 3912, 6042, 7976, 11776, 16634, 22968, 33963, 46156, 67457, 94510, 133180, 192316, 266514, 385338, 540138, 767008, 1094576, 1534704, 2200821, 3094248
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(9) = 6 because we have [4, 1, 1, 1, 1, 1], [1, 4, 1, 1, 1, 1], [1, 1, 4, 1, 1, 1], [1, 1, 1, 4, 1, 1], [1, 1, 1, 1, 4, 1] and [1, 1, 1, 1, 1, 4].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, t) option remember; local r, f, g;
          if n=0 then t else r, f, g:=$0..2; while f<=n
          do r, f, g:= r+b(n-f, 1-t), f+2*g-1, g+1 od; r fi
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 47; CoefficientList[Series[4/(3 + 2 EllipticTheta[3, 0, x] - EllipticTheta[3, 0, x]^2), {x, 0, nmax}], x]

Formula

G.f.: 4 / (3 + 2 * theta_3(x) - theta_3(x)^2), where theta_3() is the Jacobi theta function.
a(n) = (A006456(n) + A317665(n)) / 2.
a(n) = Sum_{k=0..n} A006456(k) * A317665(n-k).

A339441 Number of compositions (ordered partitions) of n into an even number of distinct triangular numbers.

Original entry on oeis.org

1, 0, 0, 0, 2, 0, 0, 2, 0, 2, 0, 2, 0, 2, 0, 0, 4, 0, 2, 0, 24, 2, 2, 0, 2, 26, 0, 2, 0, 26, 0, 28, 24, 0, 26, 24, 2, 2, 50, 2, 48, 0, 26, 26, 0, 48, 28, 72, 2, 26, 48, 4, 48, 48, 24, 74, 770, 2, 50, 48, 50, 26, 72, 720, 98, 74, 26, 74, 48, 770, 74, 768, 26, 122, 792, 72
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 05 2020

Keywords

Examples

			a(20) = 24 because we have [10, 6, 3, 1] (24 permutations).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(1+p, 2)*p!, (t->
         `if`(t>n, 0, b(n, i+1, p)+b(n-t, i+1, p+1)))(i*(i+1)/2))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 05 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[1 + p, 2]*p!, With[{t = i(i+1)/2}, If[t > n, 0, b[n, i + 1, p] + b[n - t, i + 1, p + 1]]]];
    a[n_] := b[n, 1, 0];
    a /@ Range[0, 100] (* Jean-François Alcover, Mar 14 2021, after Alois P. Heinz *)
Showing 1-3 of 3 results.