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.
%I A366066 #36 Dec 31 2023 13:25:22 %S A366066 0,1,1,2,2,2,3,2,3,3,3,4,3,4,3,4,4,4,5,4,5,4,5,4,5,5,5,5,5,6,5,6,5,6, %T A366066 5,6,6,6,6,6,6,6,7,6,7,6,7,6,7,7,7,7,7,7,7,7,7,7,7,8,7,8,7,8,8,8,8,8, %U A366066 8,8,8,8,8,8,8,8,8,8,9,8,9,9,9,9,9,9,9 %N A366066 a(n) is the largest positive integer k such that n can be expressed as the sum of k distinct positive integers that are coprime to each other. %C A366066 The indices at which k first appears, for k >= 0: 1, 3, 6, 11, 18, 29, 42, 59, 78 (A014284). Such n's are expressed as the sum of 1 and the first primes. %C A366066 Runs with length >= 2 start at numbers k^2 - 1 (k >= 2). %C A366066 If there are terms between runs of k and k+1, these two numbers occur alternately. Suppose that m is such a term that is b(m) terms after the first occurrence of k+1; if b(m) is odd, there are at least two even numbers in the expression of n as the sum of k+1 integers, which are not coprime to each other, so a(m) = k. %H A366066 Yifan Xie, <a href="/A366066/b366066.txt">Table of n, a(n) for n = 0..9999</a> %F A366066 a(n) = A083375(n) - 1 if and only if n = 7, 12, 14, 19, 21, 23, 30, 32, 34, 43, 45, 47, 60, 62, 79; otherwise, a(n) = A083375(n). %e A366066 For n = 11, 1+2+3+5=11; so a(11) = 4. %e A366066 For n = 12, 1+4+7=12; so a(12) = 3. %o A366066 (PARI) lista(nn) = v=[0]; f=[7, 12, 14, 19, 21, 23, 30, 32, 34, 43, 45, 47, 60, 62, 79]; for(n=1, nn, for(i=1, prime(n), v=concat(v, n))); for(n=1, 15, v[f[n]+1]=v[f[n]+1]-1); v; %Y A366066 Cf. A000040, A000290, A014284, A083375. %K A366066 nonn,easy %O A366066 0,4 %A A366066 _Yifan Xie_, Sep 28 2023