login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A355402
Maximal GCD of seven positive integers with sum n.
10
1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 3, 2, 1, 3, 1, 2, 3, 4, 1, 3, 1, 4, 3, 2, 5, 4, 1, 2, 3, 5, 1, 6, 1, 4, 5, 2, 1, 6, 7, 5, 3, 4, 1, 6, 5, 8, 3, 2, 1, 6, 1, 2, 9, 8, 5, 6, 1, 4, 3, 10, 1, 9, 1, 2, 5, 4, 11, 6, 1, 10, 9, 2, 1, 12, 5, 2, 3, 11, 1, 10, 13, 4, 3, 2, 5, 12
OFFSET
7,8
COMMENTS
Also largest divisor <= n/7 of n. - David A. Corneth, Jul 24 2022
LINKS
MAPLE
b:= proc(n, i, t) option remember; `if`(n=0, signum(t),
`if`(min(i, t)<1, 1, max(b(n, i-1, t),
igcd(b(n-i, min(n-i, i), t-1), i))))
end:
a:= n-> `if`(n<7, 0, b(n$2, 7)):
seq(a(n), n=7..200); # Alois P. Heinz, Jul 13 2022
MATHEMATICA
b[n_, i_, t_] := b[n, i, t] = If[n == 0, Sign[t],
If[Min[i, t] < 1, 1, Max[b[n, i - 1, t],
GCD[b[n - i, Min[n - i, i], t - 1], i]]]];
a[n_] := If[n < 7, 0, b[n, n, 7]];
Table[a[n], {n, 7, 100}] (* Jean-François Alcover, Jul 24 2022, after Alois P. Heinz *)
PROG
(PARI) a(n) = my(d = divisors(n)); d = select(x->x <= n\7, d); d[#d] \\ David A. Corneth, Jul 24 2022
CROSSREFS
Maximal GCD of k positive integers with sum n for k = 2..10: A032742 (k=2,n>=2), A355249 (k=3), A355319 (k=4), A355366 (k=5), A355368 (k=6), this sequence (k=7), A354598 (k=8), A354599 (k=9), A354601 (k=10).
Sequence in context: A373352 A112632 A254575 * A275344 A206826 A175835
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Jun 30 2022
STATUS
approved