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.

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

A339421 Number of compositions (ordered partitions) of n into an odd number of cubes.

Original entry on oeis.org

0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 3, 1, 5, 1, 7, 1, 9, 4, 11, 11, 13, 22, 15, 37, 18, 56, 29, 80, 56, 109, 107, 142, 190, 184, 313, 255, 490, 391, 731, 644, 1045, 1082, 1458, 1792, 2044, 2895, 2957, 4531, 4463, 6863, 6972, 10126, 11090, 14739, 17691, 21484, 27954, 31741
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

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

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+3*g*(g-1)+1, g+1 od; r fi
        end:
    a:= n-> b(n, 0):
    seq(a(n), n=0..60);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 57; CoefficientList[Series[(1/2) (1/(1 - Sum[x^(k^3), {k, 1, Floor[nmax^(1/3)] + 1}]) - 1/Sum[x^(k^3), {k, 0, Floor[nmax^(1/3)] + 1}]), {x, 0, nmax}], x]

Formula

G.f.: (1/2) * (1 / (1 - Sum_{k>=1} x^(k^3)) - 1 / Sum_{k>=0} x^(k^3)).
a(n) = (A023358(n) - A323633(n)) / 2.
a(n) = -Sum_{k=0..n-1} A023358(k) * A323633(n-k).

A339431 Number of compositions (ordered partitions) of n into an odd number of distinct squares.

Original entry on oeis.org

0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 6, 0, 1, 0, 0, 0, 0, 6, 0, 0, 0, 1, 6, 0, 0, 6, 6, 0, 0, 0, 0, 6, 1, 0, 6, 0, 0, 6, 6, 0, 0, 6, 6, 0, 0, 7, 6, 0, 0, 6, 6, 120, 6, 0, 0, 6, 0, 6, 12, 0, 1, 6, 126, 0, 0, 12, 6, 0, 0, 0, 12, 126, 0, 12, 6, 120, 0, 7
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(55) = 120 because we have [25, 16, 9, 4, 1] (120 permutations).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(p, 2)*p!,
         (s-> `if`(s>n, 0, b(n, i+1, p)+b(n-s, i+1, p+1)))(i^2))
        end:
    a:= n-> b(n, 1, 0):
    seq(a(n), n=0..100);  # Alois P. Heinz, Dec 04 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[n == 0, Mod[p, 2]*p!, With[{s = i^2}, If[s > n, 0, b[n, i + 1, p] + b[n - s, 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.