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.

A331884 Number of compositions (ordered partitions) of n^2 into distinct squares.

Original entry on oeis.org

1, 1, 1, 1, 1, 3, 1, 7, 1, 31, 123, 151, 121, 897, 7351, 5415, 14881, 48705, 150583, 468973, 1013163, 1432471, 1730023, 50432107, 14925241, 125269841, 74592537, 241763479, 213156871, 895153173, 7716880623, 2681163865, 3190865761, 22501985413, 116279718801
Offset: 0

Views

Author

Ilya Gutkovskiy, Jan 30 2020

Keywords

Examples

			a(5) = 3 because we have [25], [16, 9] and [9, 16].
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i, p) option remember;
          `if`(i*(i+1)*(2*i+1)/6n, 0, b(n-i^2, i-1, p+1))+b(n, i-1, p)))
        end:
    a:= n-> b(n^2, n, 0):
    seq(a(n), n=0..35);  # Alois P. Heinz, Jan 30 2020
  • Mathematica
    b[n_, i_, p_] := b[n, i, p] = If[i(i+1)(2i+1)/6 < n, 0, If[n == 0, p!, If[i^2 > n, 0, b[n - i^2, i - 1, p + 1]] + b[n, i - 1, p]]];
    a[n_] := b[n^2, n, 0];
    a /@ Range[0, 35] (* Jean-François Alcover, Nov 08 2020, after Alois P. Heinz *)

Formula

a(n) = A331844(A000290(n)).

Extensions

a(24)-a(34) from Alois P. Heinz, Jan 30 2020