%I #19 Nov 08 2024 08:37:11
%S 6,28,36,66,78,120,210,276,300,378,496,528,630,666,780,820,990,1128,
%T 1176,1326,1540,1596,1770,1830,2016,2080,2346,2556,2628,2850,3160,
%U 3240,3486,3570,3828,4095,4278,4560,4656,4950,5460,5778,5886,6216,6328,6786,7140,7260,7626,7875,8128,8256,8646
%N Triangular numbers that are pseudoperfect (semiperfect).
%C A number is called pseudoperfect (or semiperfect) if it is equal to the sum of a subset of its proper divisors.
%C If x == 0, 1, 4 or 9 (mod 12), the triangular number k = x * (x-1)/2 is divisible by 6, and k is a term since k = k/2 + k/3 + k/6. - _Robert Israel_, Nov 07 2024
%H Robert Israel, <a href="/A376997/b376997.txt">Table of n, a(n) for n = 1..10000</a>
%e 6 is a term because has three proper divisors (1, 2, 3) and the sum of subset (1,2,3) is 6.
%e 36 is a term because has five proper divisors (1, 2, 3, 4, 6, 9, 12, 18, 36) and the sum of the subset (6,12,18) is 36.
%p ispp:= proc(n) uses Optimization;
%p local D,d,R;
%p D:= numtheory:-divisors(n) minus {n};
%p R:= traperror(Minimize(add(x[d],d=D), {add(d*x[d],d=D)=n},assume=binary));
%p R <> lasterror and R[1] > 0
%p end proc;
%p select(ispp, [seq(i*(i+1)/2, i=1..200)]); # _Robert Israel_, Oct 16 2024
%t psQ[n_] := Module[{d = Most[Divisors[n]], x}, Total[d] >= n && SeriesCoefficient[Series[Product[1 + x^d[[i]], {i, 1, Length[d]}], {x, 0, n}], n] > 0]; Select[Accumulate[Range[132]], psQ] (* _Amiram Eldar_, Oct 12 2024 *)
%Y Intersection of A000217 and A005835.
%K nonn
%O 1,1
%A _Massimo Kofler_, Oct 12 2024