OFFSET
1,1
COMMENTS
Called two-layered numbers in Behzadipour link.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..3000
Hussein Behzadipour, Two-layered numbers, arXiv:1812.07233 [math.NT], 2018.
EXAMPLE
36 is a term with {2, 3, 4, 36} and {6, 9, 12, 18} having equal sums 45.
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
l:= sort([(numtheory[divisors](k) minus {1})[]]);
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..50); # Alois P. Heinz, Dec 22 2018
MATHEMATICA
aQ[n_] := Module[{d = Rest[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, 6500], aQ] (* Amiram Eldar, Dec 22 2018 after T. D. Noe at A083207 *)
PROG
(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), d), s=sum(i=1, #dd, dd[i])); s%2==0 && part(s/2-n, dd[1..#dd-1]); \\ both after pari in A083207
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Marcus, Dec 22 2018
STATUS
approved