OFFSET
1,2
COMMENTS
For n equal to 1, 2, 3, 4, 6, 8, 12, 24, 30, 36, etc. the maximum value is equal to sigma(n).
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000
EXAMPLE
For n=10 the partition (4,6) gives sigma(4)+sigma(6)= 7 + 12 = 19 that is the maximum value that can be reached.
For n=21 the partitions (1,8,12), (3,6,12) and (1,2,6,12) give:
sigma(1)+sigma(8)+sigma(12)= 1 + 15 + 28 = 44;
sigma(3)+sigma(6)+sigma(12)= 4 + 12 + 28 = 44;
sigma(1)+sigma(2)+ sigma(6)+sigma(12)= 1 + 3 + 12 + 28 = 44
that is the maximum value that can be reached.
MAPLE
with(numtheory); with(combinat);
A211220:=proc(q)
local b, c, i, j, k, m, n, t;
for n from 1 to q do
k:=partition(n); b:=numbpart(n); m:=0;
for i from 1 to b do
c:=nops(k[i]); t:=0;
for j from 1 to c do t:=t+sigma(k[i][j]); od; if t>m then m:=t; fi; od;
print(m);
od; end:
A211220(100);
# second Maple program:
with(numtheory):
b:= proc(n, i) option remember; `if`(n=0, 0, `if`(i<1,
-infinity, max(seq(sigma(i)*j+b(n-i*j, i-1), j=0..n/i))))
end:
a:= n-> b(n$2):
seq(a(n), n=1..70); # Alois P. Heinz, May 30 2013
MATHEMATICA
b[n_, i_] := b[n, i] = If[n==0, 0, If[i<1, -Infinity, Max[Table[ DivisorSigma[1, i]*j + b[n-i*j, i-1], {j, 0, n/i}]]]]; a[n_] := b[n, n]; Table[a[n], {n, 1, 70}] (* Jean-François Alcover, Feb 16 2017, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Paolo P. Lava, Apr 11 2012
EXTENSIONS
Extended beyond a(47) by Alois P. Heinz, May 30 2013
STATUS
approved