OFFSET
1,1
COMMENTS
a(n) = A046343(n) if n is semiprime.
This sequence is included in A063655. - Giovanni Resta, May 18 2016
a(n) >= 2 * sqrt(A002808(n)). - David A. Corneth, May 20 2016
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
EXAMPLE
a(14) = 10 because A002808(14) = 24 = 2*12 = 3*8 = 4*6 and 4+6 = 10 is the minimum sum.
MAPLE
with(numtheory):nn:=100:lst:={}:
for n from 1 to nn do:
it:=0:lst:={}:
d:=divisors(n):n0:=nops(d):
if n0>2 then
for i from 2 to n0-1 do:
p:=d[i]:
for j from i to n0-1 do:
q:=d[j]:
if p*q=n then
lst:=lst union {p+q}:
else
fi:
od:
od:
printf(`%d, `, lst[1]):
fi:
od:
MATHEMATICA
Function[n, If[OddQ@ Length@ #, 2 Sqrt@ n, Total@ Take[#, {Length[#]/2, Length[#]/2 + 1}]] &@ Divisors@ n] /@ Select[Range@ 93, CompositeQ] (* Michael De Vlieger, May 20 2016 *)
msd[n_]:=Module[{d=Divisors[n], len}, len=Length[d]; If[OddQ[len], 2*d[[ (len+1)/2]], d[[len/2]]+d[[len/2+1]]]]; msd/@Select[Range[200], CompositeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 09 2018 *)
PROG
(PARI) forcomposite(n=4, 100, d=divisors(n); t=#d; k=if(t%2, 2*d[t\2+1], d[t\2]+d[t\2+1]); print1(k", ")) \\ Charles R Greathouse IV, Jun 08 2016
CROSSREFS
KEYWORD
nonn
AUTHOR
Michel Lagneau, May 18 2016
EXTENSIONS
Name edited by Jon E. Schoenfield, Sep 12 2017
STATUS
approved