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.

A366461 a(n) = number of partitions of n that have the maximum number of neighbors; see Comments.

Original entry on oeis.org

1, 2, 1, 2, 1, 1, 2, 1, 6, 1, 2, 1, 6, 2, 1, 2, 1, 6, 2, 8, 1, 2, 1, 6, 2, 8, 1, 1, 2, 1, 6, 2, 8, 1, 6, 1, 2, 1, 6, 2, 8, 1, 6, 22, 1, 2, 1, 6, 2, 8, 1, 6, 22, 2, 1, 2, 1, 6, 2, 8, 1, 6, 22, 2, 8, 1, 2, 1, 6, 2, 8, 1, 6, 22, 2, 8, 30, 1, 2, 1, 6, 2, 8, 1, 6, 22
Offset: 1

Views

Author

Clark Kimberling, Oct 12 2023

Keywords

Comments

Partitions p and q of n are neighbors if d(p,q) = 2, where d is the distance function in A366156.

Examples

			Refer to the Example in A366429 to see that a(5) = 1.
		

Crossrefs

Programs

  • Mathematica
    c[n_] := PartitionsP[n];
    q[n_, k_] := q[n, k] = IntegerPartitions[n][[k]];
    r[n_, k_] := r[n, k] = Join[q[n, k], ConstantArray[0, n - Length[q[n, k]]]];
    d[u_, v_] := d[u, v] = Total[Abs[u - v]];
    s[n_, k_] := s[n, k] = Select[Range[c[n]], d[r[n, k], r[n, #]] == 2 &]
    t[n_] := t[n] = Table[s[n, k], {k, 1, c[n]}]
    a[n_] := Max[Map[Length, t[n]]]
    b[n_] := b[n] = Select[t[n], Length[#] == a[n] &]
    e[n_] := Length[b[n]]
    Table[e[n], {n, 1, 24}]

Extensions

More terms from Pontus von Brömssen, Oct 24 2023