A364808 a(n) = sum of minimal runlengths of all the partitions of n.
1, 3, 5, 9, 11, 20, 22, 36, 44, 63, 74, 114, 128, 180, 224, 298, 355, 485, 573, 760, 922, 1174, 1419, 1836, 2189, 2756, 3341, 4160, 4988, 6217, 7412, 9131, 10941, 13326, 15916, 19379, 22988, 27770, 33017, 39662, 46919, 56223, 66308, 79047, 93187, 110512
Offset: 1
Keywords
Examples
The partitions of 4 are [4], [3,1], [2,2], [2,1,1], [1,1,1,1], with runlengths {1}, {1,1}, {2}, {1,2}, {4} having minima 1, 1, 2, 1, 4, with sum 9, so that a(4) = 9.
Links
- Alois P. Heinz, Table of n, a(n) for n = 1..2000
Programs
-
Maple
b:= proc(n, i, m) option remember; `if`(n=0, m, `if`(i=1, min(m, n), add(b(n-i*j, i-1, `if`(j=0, m, min(m, j))), j=0..n/i))) end: a:= n-> b(n$3): seq(a(n), n=1..50); # Alois P. Heinz, Sep 17 2023
-
Mathematica
m[n_] := m[n] = Map[Split, IntegerPartitions[n]] t[n_] := t[n] = Table[Map[Length, m[n][[k]]], {k, 1, PartitionsP[n]}] Table[Total[Map[Min, t[n]]], {n, 1, 47}]
-
Python
from sympy.utilities.iterables import partitions def A364808(n): return sum(min(p.values()) for p in partitions(n)) # Chai Wah Wu, Sep 17 2023