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.

A319435 Number of partitions of n^2 into exactly n nonzero squares.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 4, 4, 9, 16, 24, 52, 83, 152, 305, 515, 959, 1773, 3105, 5724, 10255, 18056, 32584, 58082, 101719, 179306, 317610, 552730, 962134, 1683435, 2899064, 4995588, 8638919, 14746755, 25196684, 43082429, 72959433, 123554195, 209017908, 351164162
Offset: 0

Views

Author

Alois P. Heinz, Sep 18 2018

Keywords

Examples

			a(0) = 1: the empty partition.
a(1) = 1: 1.
a(2) = 0: there is no partition of 4 into exactly 2 nonzero squares.
a(3) = 1: 441.
a(4) = 1: 4444.
a(5) = 1: 94444.
a(6) = 4: (25)44111, (16)(16)1111, (16)44444, 999441.
a(7) = 4: (25)(16)41111, (25)444444, (16)(16)44441, (16)999411.
a(8) = 9: (49)9111111, (36)(16)441111, (36)4444444, (25)(25)911111, (25)(16)944411, (25)9999111, (16)(16)(16)94111, (16)9999444, 99999991.
		

Crossrefs

Programs

  • Maple
    h:= proc(n) option remember; `if`(n<1, 0,
          `if`(issqr(n), n, h(n-1)))
        end:
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(i<1 or
          t<1, 0, b(n, h(i-1), t)+b(n-i, h(min(n-i, i)), t-1)))
        end:
    a:= n-> (s-> b(s$2, n)-`if`(n=0, 0, b(s$2, n-1)))(n^2):
    seq(a(n), n=0..40);
  • Mathematica
    h[n_] := h[n] = If[n < 1, 0, If[Sqrt[n] // IntegerQ, n, h[n - 1]]];
    b[n_, i_, t_] := b[n, i, t] = If[n == 0, 1, If[i < 1 || t < 1, 0, b[n, h[i - 1], t] + b[n - i, h[Min[n - i, i]], t - 1]]];
    a[n_] := Function[s, b[s, s, n] - If[n == 0, 0, b[s, s, n - 1]]][n^2];
    a /@ Range[0, 40] (* Jean-François Alcover, Nov 06 2020, after Alois P. Heinz *)
  • SageMath
    # uses[GeneralizedEulerTransform(n, a) from A338585], slow.
    def A319435List(n): return GeneralizedEulerTransform(n, lambda n: n^2)
    print(A319435List(10)) # Peter Luschny, Nov 12 2020

Formula

a(n) = A243148(n^2,n).