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.

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, ...}.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, May 18 2016

Keywords

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

Examples

			a(14) = 10 because A002808(14) = 24 = 2*12 = 3*8 = 4*6 and 4+6 = 10 is the minimum sum.
		

Crossrefs

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