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.

Showing 1-2 of 2 results.

A322658 Integers whose set of proper divisors, excluding 1, can be partitioned into two nonempty subsets having equal sum.

Original entry on oeis.org

36, 72, 105, 144, 195, 200, 255, 288, 315, 324, 345, 385, 392, 400, 450, 495, 525, 576, 585, 648, 675, 735, 784, 800, 805, 825, 855, 882, 900, 945, 975, 1035, 1152, 1155, 1295, 1296, 1305, 1323, 1365, 1395, 1425, 1449, 1463, 1485, 1547, 1568, 1575, 1600, 1645, 1665, 1755, 1764, 1785
Offset: 1

Views

Author

Michel Marcus, Dec 22 2018

Keywords

Comments

Called half-layered numbers in Behzadipour link.

Examples

			36 is a term with {2, 3, 4, 18} and B = {6, 9, 12} having equal sums 27.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; local k, l, t, b; b:=
          proc(m, i) option remember; m=0 or i>0 and
            (b(m, i-1) or l[i]<=m and b(m-l[i], i-1)) end;
          for k from 1+`if`(n=1, 1, a(n-1)) do
            if isprime(k) then next fi;
            l:= sort([(numtheory[divisors](k) minus {1, k})[]]);
            t:= add(i, i=l);
            if t::even then forget(b);
              if b(t/2, nops(l)) then return k fi
            fi
          od
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, Dec 22 2018
  • Mathematica
    aQ[n_] := CompositeQ[n] && Module[{d = Rest[Most[Divisors[n]]], t, ds, x}, ds = Plus @@ d; If[Mod[ds, 2] > 0, False, t = CoefficientList[Product[1 + x^i, {i, d}], x]; t[[1 + ds/2]] > 0]]; Select[Range[2, 1785], aQ]  (* Amiram Eldar, Dec 22 2018 after T. D. Noe at A083207 *)
  • PARI
    part(n, v)=if(n<1, return(n==0)); forstep(i=#v, 2, -1, if(part(n-v[i], v[1..i-1]), return(1))); n==v[1];
    is(n)=my(d=divisors(n), dd = select(x->((x>1) && (xA083207

A382953 Numbers with at least one factorization for which the factors can be partitioned into 2 or more distinct subsets with equal sums.

Original entry on oeis.org

16, 30, 48, 54, 64, 70, 72, 84, 96, 120, 126, 128, 144, 160, 162, 180, 192, 198, 210, 216, 240, 243, 250, 252, 256, 264, 270, 280, 286, 288, 300, 308, 320, 324, 330, 336, 360, 378, 384, 390, 396, 400, 420, 432, 440, 448, 462, 468, 480, 486, 495, 504, 510, 512
Offset: 1

Views

Author

Charles L. Hohn, Apr 09 2025

Keywords

Comments

Here "distinct" means that no partition contains the same subset of factors, e.g. 4 is not a term because {2} == {2}.
Because 2 + 2 = 2 * 2 = 4, many terms have multiple instances that differ only by factors {2, 2} vs. {4}, except in some cases where such substitutions would create indistinct subsets, e.g. while 16 is a term for partition set {{2, 2}, {4}}, {{2, 2}, {2, 2}} and {{4}, {4}} do not count as additional instances.
For primes p and integers x >= 0, p^(p+2+2x) and p^(2p+3+x) are terms.
For integers x and y >= 0, (4x+4)^(y+2) and (4x+6)^(y+3) are terms.
First few terms with record counts of instances: 16 (1 instance), 48 (2), 120 (3), 240 (6), 576 (8), 720 (9), 768 (12).
If k is a term, then 4k is also a term. - Ivan N. Ianakiev, Apr 10 2025

Examples

			a(1) = 16: 2 * 2 * 4 = 16 and 2 + 2 = 4.
a(2) = 30: 2 * 3 * 5 = 30 and 2 + 3 = 5.
a(3) = 48: 2 * 2 * 2 * 6 = 48 and 2 + 2 + 2 = 6, and also 2 * 4 * 6 = 48 and 2 + 4 = 6.
a(5) = 64: 2 * 2 * 2 * 2 * 4 = 64 and 2 + 2 + 2 = 2 + 4.
a(39) = 384: 2 * 2 * 2 * 2 * 4 * 6 = 384 and 2 + 2 + 2 = 2 + 4 = 6 (plus 4 other instances).
		

Crossrefs

Cf. A083207, A322657, A255265 (subsequence).

Programs

  • Mathematica
    ok[n_]:=Catch@ Block[{t, d=Divisors@n,f}, f[y_]:=Block[{L={}, r}, r[x_,m_,c_]:= If[x==1, AppendTo[L,c], r[x/#, #, Append[c,#]]& /@ Select[ Divisors@x, #>=m&];]; f[y,2,{}]; L]; Do[t=Plus@@@ s[d[[i]]]; If[d[[i]]^2!=n, Intersection[t, Plus@@@ s[n/d[[i]]]] != {} && Throw@True, Sort@t != Union@t && Throw@True],{i, 2, Ceiling[ Length@d/2]}]; False]; Select[Range@ 512,ok] (* Giovanni Resta, Apr 10 2025 *)
  • PARI
    a382953_count(x, f=List())={my(r=x/if(#f, vecprod(Vec(f)), 1)); if(#f && r==1, my(c=0, s=vecsum(Vec(f)), d=divisors(s)); for(i=2, #d, my(z=s/d[i]); if(z1, next); listput(f, d); c+=a382953_count(x, f); listpop(f)); return(c)}
    a382953_part(f, z, rvs=0, v=List())={my(c=0); if(#v==#f[2], if(sum(i=1, #v, f[1][i]*v[i])
    				
Showing 1-2 of 2 results.