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.

A366746 Maximum distance between a partition of n and its contraconjugate.

Original entry on oeis.org

1, 2, 2, 2, 2, 6, 6, 6, 8, 8, 12, 16, 20, 22, 30, 36, 42, 56, 68, 82, 118, 134, 160, 174
Offset: 1

Views

Author

Clark Kimberling, Oct 25 2023

Keywords

Comments

See A366745 for the definition of contraconjugate.

Crossrefs

Programs

  • Mathematica
    r[n_, k_] := r[n, k] = Join[p[n, k], ConstantArray[0, n - Length[p[n, k]]]];
    p1[n_, k_] := p1[n, k] = Reverse[IntegerPartitions[n]][[k]];
    r1[n_, k_] := r1[n, k] = Join[p1[n, k], ConstantArray[0, n - Length[p1[n, k]]]];
    d[u_, v_] := Total[Abs[u - v]]; (* distance function *)
    t[n_] := Flatten[Table[d[r[n, k], r1[n, k]], {k, 1, c[n]}]];
    t1 = Table[Count[t[n], m], {n, 1, 24}, {m, 0, 2 n - 1, 2}];  (* A366745 *)
    Map[Max, t1]