A273227 Consider all ways of writing the n-th composite number as the product of two divisors d1*d2 = d3*d4 = ...; a(n) is the minimum of the sums {d1 + d2, d3 + d4, ...}.
4, 5, 6, 6, 7, 7, 9, 8, 8, 9, 9, 10, 13, 10, 10, 15, 12, 11, 11, 12, 14, 19, 12, 12, 21, 16, 13, 13, 15, 14, 25, 14, 14, 15, 20, 17, 15, 16, 15, 22, 31, 16, 33, 16, 16, 18, 17, 21, 26, 17, 17, 39, 20, 23, 18, 19, 18, 18, 43, 19, 22, 45, 32, 19, 19, 20, 27, 34
Offset: 1
Keywords
Examples
a(14) = 10 because A002808(14) = 24 = 2*12 = 3*8 = 4*6 and 4+6 = 10 is the minimum sum.
Links
- Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
Programs
-
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 *)
-
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
Extensions
Name edited by Jon E. Schoenfield, Sep 12 2017
Comments