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.

A355249 Maximal GCD of three positive integers with sum n.

This page as a plain text file.
%I A355249 #21 Sep 21 2022 11:28:28
%S A355249 1,1,1,2,1,2,3,2,1,4,1,2,5,4,1,6,1,5,7,2,1,8,5,2,9,7,1,10,1,8,11,2,7,
%T A355249 12,1,2,13,10,1,14,1,11,15,2,1,16,7,10,17,13,1,18,11,14,19,2,1,20,1,2,
%U A355249 21,16,13,22,1,17,23,14,1,24,1,2,25,19,11,26,1,20,27,2,1,28
%N A355249 Maximal GCD of three positive integers with sum n.
%F A355249 From _Bernard Schott_, Jun 27 2022: (Start)
%F A355249 a(3n) = n for n >= 1.
%F A355249 a(p) = 1 for p prime >= 3. (End)
%t A355249 a[n_] := GCD @@@ IntegerPartitions[n, {3}] // Max;
%t A355249 Table[a[n], {n, 3, 100}] (* _Jean-François Alcover_, Sep 21 2022 *)
%o A355249 (Python)
%o A355249 from math import gcd
%o A355249 def a(n): return max(gcd(i, j, n-i-j) for i in range(1, n//3+1) for j in range(i, n//3+1))
%o A355249 print([a(n) for n in range(3, 85)]) # _Michael S. Branicky_, Jun 26 2022
%Y A355249 Cf. A085891, A129648.
%Y A355249 Maximal GCD of k positive integers with sum n for k = 2..10: A032742 (k=2,n>=2), this sequence (k=3), A355319 (k=4), A355366 (k=5), A355368 (k=6), A355402 (k=7), A354598 (k=8), A354599 (k=9), A354601 (k=10).
%K A355249 nonn
%O A355249 3,4
%A A355249 _Wesley Ivan Hurt_, Jun 25 2022