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.
a033676 n = last $ takeWhile (<= a000196 n) $ a027750_row n -- Reinhard Zumkeller, Jun 04 2012
A033676 := proc(n) local a,d; a := 0 ; for d in numtheory[divisors](n) do if d^2 <= n then a := max(a,d) ; end if; end do: a; end proc: # R. J. Mathar, Aug 09 2009
largestDivisorLEQR[n_Integer] := Module[{dvs = Divisors[n]}, dvs[[Ceiling[Length@dvs/2]]]]; largestDivisorLEQR /@ Range[100] (* Borislav Stanimirov, Mar 28 2010 *) Table[Last[Select[Divisors[n],#<=Sqrt[n]&]],{n,100}] (* Harvey P. Dale, Mar 17 2017 *)
A033676(n) = {local(d);if(n<2,1,d=divisors(n);d[(length(d)+1)\2])} \\ Michael B. Porter, Jan 30 2010
from sympy import divisors def A033676(n): d = divisors(n) return d[(len(d)-1)//2] # Chai Wah Wu, Apr 05 2021
n = 252, D = {1, 2, 3, 4, 6, 7, 9, 12, 14, 18, 21, 28, 36, 42, 63, 84, 126, 252}, 18 divisors, the 9th is 14, so a(252) = 14. From _Gus Wiseman_, Feb 28 2021: (Start) The strictly inferior divisors of selected n: n = 1 2 6 12 20 30 42 56 72 90 110 132 156 182 210 240 ----------------------------------------------------------------- {} 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 3 4 3 3 4 3 3 5 3 3 7 3 3 5 6 7 4 5 10 4 4 13 5 4 6 6 6 6 6 5 8 9 11 12 7 6 10 8 14 10 12 15 (End)
with(numtheory): a:= n-> max(select(d-> is(d=1 or dAlois P. Heinz, Jan 29 2018
Table[Part[Divisors[w], Floor[DivisorSigma[0, w]/2]], {w, 1, 256}] Table[If[n==1,1,Max[Select[Divisors[n],#Gus Wiseman, Feb 28 2021 *)
A060775(n)=if(n>1,divisors(n)[numdiv(n)\2],1) \\ M. F. Hasler, Sep 21 2011
Divisors of 6!=720 are {1, 2, 3, 4, 5, 6, ..., 24, 30, ..., 360, 720}. a(6)=30, the 16th one from the 30 divisors of 720.
Table[ Part[ Divisors[ w! ], 1+Floor[ DivisorSigma[ 0, n! ]/2 ] ], {w, a, b} ]
n = 8, q(8) = 2*3*5*7*11*13*17*19 = 9699690. Its 128th and 129th divisors are {3094, 3135}: a(8) = 3135, and 3094 < A000196(9699690) = 3114 < 3135. [Corrected by _M. F. Hasler_, Sep 20 2011]
k = 1; Do[k *= Prime[n]; l = Divisors[k]; x = Length[l]; Print[l[[x/2 + 1]]], {n, 1, 24}] (* Ryan Propper, Jul 25 2005 *)
A060796(n) = divisors(prod(k=1,n,prime(k)))[2^(n-1)+1] \\ Requires stack size > 2^(n+5). - M. F. Hasler, Sep 20 2011
n = 8: q(8) = 2*3*5*7*11*13*17*19 = 9699690. Its 128th and 129th divisors are {3094, 3135}: a(8) = 3094 and 3094 < A000196(9699690) = 3114 < 3135. [Corrected by _Colin Barker_, Oct 22 2010] 2*3*5*7 = 210 = 14*15 with difference of 1, so a(4) = 14.
F:= proc(n) local P,N,M; P:= {seq(ithprime(i),i=1..n)}; N:= floor(sqrt(convert(P,`*`))); M:= map(convert, combinat:-powerset(P),`*`); max(select(`<=`,M,N)) end proc: map(F, [$1..20]); # Robert Israel, Feb 22 2016
a[n_] := (m = Times @@ Prime[Range[n]] ; dd = Divisors[m]; dd[[Length[dd]/2 // Floor]]); Table[Print[an = a[n]]; an, {n, 1, 25}] (* Jean-François Alcover, Oct 15 2016 *)
a(n) = my(m=prod(i=1, n, prime(i))); divisors(m)[numdiv(m)\2]; \\ Michel Marcus, Feb 22 2016
For n = 6, 6! = 720 = 8*9*10, so x=8, y=9, z=10.
For n=1, we put 1 in one set and the other is empty; with the standard convention for empty products, both products are 1. For n=13, the central pair of divisors of n! are 78975 and 78848. Since neither is divisible by 10, these values cannot be obtained. The next pair of divisors are 79200 = 12*11*10*6*5*2*1 and 78624 = 13*9*8*7*4*3, so a(13) = 78624.
a:= proc(n) local l, ll, g, p, i; l:= [i$i=1..n]; ll:= [i!$i=1..n]; g:= proc(m, j, b) local mm, bb, k; if j=1 then m else mm:= m; bb:= b; for k to 2 while (mmbb then bb:= max(bb, g(mm, j-1, bb)) fi; mm:= mm*l[j] od; bb fi end; Digits:= 700; p:= ceil(sqrt(ll[n])); g(1, nops(l), 1) end: seq(a(n), n=1..23); # Alois P. Heinz, Nov 22 2011
a[n_] := a[n] = Module[{s, t}, {s, t} = MinimalBy[{#, Complement[Range[n], #]}& /@ Subsets[Range[n]], Abs[Times @@ #[[1]] - Times @@ #[[2]]]&][[1]]; Min[Times @@ s, Times @@ t]]; Table[Print[n, " ", a[n]]; a[n], {n, 1, 25}] (* Jean-François Alcover, Nov 03 2020 *)
from itertools import combinations def prod(l): t=1 for x in l: t *= x return t def a200743(n): nums = list(range(1,n+1)) widths = combinations(nums,n//2) dimensions = [(prod(width),prod(x for x in nums if x not in width)) for width in widths] best = min(dimensions,key=lambda x:max(*x)-min(*x)) return min(best) # Christian Perfect, Feb 04 2015
from math import prod, factorial from itertools import combinations def A200743(n): m = factorial(n) return min((abs((p:=prod(d))-m//p),min(p,m//p)) for l in range(n,n//2,-1) for d in combinations(range(1,n+1),l))[1] # Chai Wah Wu, Apr 07 2022
Comments