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.

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

Original entry on oeis.org

0, 1, 0, 1, 1, 1, 3, 1, 5, 5, 7, 14, 10, 27, 27, 44, 69, 73, 144, 158, 260, 366, 466, 775, 940, 1490, 2031, 2803, 4264, 5551, 8460, 11525, 16399, 23864, 32435, 47981, 66005, 94701, 135072, 187999, 272678, 379095, 543626, 769490, 1083788, 1553661, 2177681, 3113333
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

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

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, 0):
    seq(a(n), n=0..50);  # Alois P. Heinz, Dec 03 2020
  • Mathematica
    nmax = 47; CoefficientList[Series[1/(3 - EllipticTheta[3, 0, x]) - 1/(1 + EllipticTheta[3, 0, x]), {x, 0, nmax}], x]

Formula

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

A339420 Number of compositions (ordered partitions) of n into an even number of cubes.

Original entry on oeis.org

1, 0, 1, 0, 1, 0, 1, 0, 1, 2, 1, 4, 1, 6, 1, 8, 2, 10, 7, 12, 16, 14, 29, 16, 46, 22, 67, 40, 94, 78, 125, 144, 161, 246, 214, 394, 312, 602, 499, 878, 835, 1236, 1396, 1722, 2286, 2446, 3637, 3614, 5598, 5560, 8358, 8782, 12226, 14014, 17776, 22278, 26056, 34924
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 03 2020

Keywords

Examples

			a(11) = 4 because we have [8, 1, 1, 1], [1, 8, 1, 1], [1, 1, 8, 1] and [1, 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, 1):
    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} A023358(k) * A323633(n-k).

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

Original entry on oeis.org

1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 2, 2, 0, 0, 2, 24, 0, 0, 0, 2, 0, 0, 2, 0, 24, 2, 2, 0, 0, 0, 2, 24, 0, 0, 0, 26, 24, 2, 2, 24, 0, 0, 24, 2, 0, 0, 2, 24, 24, 0, 28, 24, 0, 2, 0, 24, 24, 0, 2, 26, 24, 0, 0, 72, 24, 2
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 04 2020

Keywords

Examples

			a(30) = 24 because we have [16, 9, 4, 1] (24 permutations).
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember; `if`(n=0, irem(1+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[1 + 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 09 2021, after Alois P. Heinz *)
Showing 1-3 of 3 results.