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 A365315 #21 Sep 14 2023 01:10:23 %S A365315 0,0,0,1,2,4,5,8,10,12,15,18,20,24,28,28,35,37,42,44,49,49,60,59,66, %T A365315 65,79,74,85,84,93,93,107,100,120,104,126,121,142,129,145,140,160,150, %U A365315 173,154,189,170,196,176,208,193,223,202,238,203,241,227,267,235 %N A365315 Number of unordered pairs of distinct positive integers <= n that can be linearly combined using positive coefficients to obtain n. %C A365315 We consider (for example) that 2x + y + 3z is a positive linear combination of (x,y,z), but 2x + y is not, as the coefficient of z is 0. %H A365315 Chai Wah Wu, <a href="/A365315/b365315.txt">Table of n, a(n) for n = 0..10000</a> %e A365315 We have 19 = 4*3 + 1*7, so the pair (3,7) is counted under a(19). %e A365315 For the pair p = (2,3), we have 4 = 2*2 + 0*3, so p is counted under A365314(4), but it is not possible to write 4 as a positive linear combination of 2 and 3, so p is not counted under a(4). %e A365315 The a(3) = 1 through a(10) = 15 pairs: %e A365315 (1,2) (1,2) (1,2) (1,2) (1,2) (1,2) (1,2) (1,2) %e A365315 (1,3) (1,3) (1,3) (1,3) (1,3) (1,3) (1,3) %e A365315 (1,4) (1,4) (1,4) (1,4) (1,4) (1,4) %e A365315 (2,3) (1,5) (1,5) (1,5) (1,5) (1,5) %e A365315 (2,4) (1,6) (1,6) (1,6) (1,6) %e A365315 (2,3) (1,7) (1,7) (1,7) %e A365315 (2,5) (2,3) (1,8) (1,8) %e A365315 (3,4) (2,4) (2,3) (1,9) %e A365315 (2,6) (2,5) (2,3) %e A365315 (3,5) (2,7) (2,4) %e A365315 (3,6) (2,6) %e A365315 (4,5) (2,8) %e A365315 (3,4) %e A365315 (3,7) %e A365315 (4,6) %t A365315 combp[n_,y_]:=With[{s=Table[{k,i},{k,y},{i,1,Floor[n/k]}]},Select[Tuples[s],Total[Times@@@#]==n&]]; %t A365315 Table[Length[Select[Subsets[Range[n],{2}],combp[n,#]!={}&]],{n,0,30}] %o A365315 (Python) %o A365315 from itertools import count %o A365315 from sympy import divisors %o A365315 def A365315(n): %o A365315 a = set() %o A365315 for i in range(1,n+1): %o A365315 for j in count(i,i): %o A365315 if j >= n: %o A365315 break %o A365315 for d in divisors(n-j): %o A365315 if d>=i: %o A365315 break %o A365315 a.add((d,i)) %o A365315 return len(a) # _Chai Wah Wu_, Sep 13 2023 %Y A365315 The unrestricted version is A000217, ranks A001358. %Y A365315 For all subsets instead of just pairs we have A088314, complement A365322. %Y A365315 For strict partitions we have A088571, complement A088528. %Y A365315 The case of nonnegative coefficients is A365314, for all subsets A365073. %Y A365315 The (binary) complement is A365321, nonnegative A365320. %Y A365315 A004526 counts partitions of length 2, shift right for strict. %Y A365315 A007865 counts sum-free subsets, complement A093971. %Y A365315 A179822 and A326080 count sum-closed subsets. %Y A365315 A326083 and A124506 appear to count combination-free subsets. %Y A365315 A364350 counts combination-free strict partitions. %Y A365315 A364914 and A365046 count combination-full subsets. %Y A365315 Cf. A070880, A088809, A326020, A364534, A365043, A365311, A365312, A365378, A365379, A365380, A365383. %K A365315 nonn %O A365315 0,5 %A A365315 _Gus Wiseman_, Sep 06 2023