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.

Showing 1-10 of 11 results. Next

A060796 Upper central divisor of n-th primorial.

Original entry on oeis.org

2, 3, 6, 15, 55, 182, 715, 3135, 15015, 81345, 448630, 2733549, 17490603, 114388729, 785147363, 5708795638, 43850489690, 342503171205, 2803419704514, 23622001517543, 201817933409378, 1793779635410490, 16342166369958702, 154171363634898185, 1518410187442699518, 15259831781575946565
Offset: 1

Views

Author

Labos Elemer, Apr 27 2001

Keywords

Comments

Also: Write product of first n primes as x*y with x < y and x maximal; sequence gives value of y. Indeed, p(n)# = primorial(n) = A002110(n) is never a square for n >= 1; all exponents in the prime factorization are 1. Therefore primorial(n) has N = 2^n distinct divisors. Since this is an even number, the N divisors can be grouped in N/2 pairs {d(k), d(N+1-k)} with product equal to p(n)#. One of the two is always smaller and one is larger than sqrt(p(n)#). This sequence gives the (2^(n-1)+1)-th divisor, which is the smallest one larger than sqrt(p(n)#). - M. F. Hasler, Sep 20 2011

Examples

			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]
		

Crossrefs

Programs

  • Mathematica
    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 *)
  • PARI
    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

Formula

a(n) = A033677(A002110(n)).
a(n) = A002110(n)/A060795(n). - M. F. Hasler, Mar 21 2022

Extensions

More terms from Ryan Propper, Jul 25 2005
a(24)-a(37) in b-file calculated from A182987 by M. F. Hasler, Sep 20 2011
a(38) from David A. Corneth, Mar 21 2022
a(39)-a(70) in b-file from Max Alekseyev, Apr 20 2022

A061030 Factorial splitting: write n! = x*y*z with x

Original entry on oeis.org

1, 2, 4, 8, 15, 32, 64, 144, 330, 768, 1800, 4368, 10800, 27300, 70560, 184800, 494208, 1343680, 3704400, 10388250, 29560960, 85250880, 249318000, 738720000, 2216160000, 6729074352, 20675655000, 64247758848, 201820667904
Offset: 3

Views

Author

Ed Pegg Jr, May 25 2001

Keywords

Examples

			For n = 6, 6! = 720 = 8*9*10, so x=8, y=9, z=10.
		

References

  • Luc Kumps, personal communication.

Crossrefs

Extensions

a(10) and a(11) corrected and a(14)-a(31) from Donovan Johnson, May 11 2010

A200743 Divide integers 1..n into two sets, minimizing the difference of their products. This sequence is the smaller product.

Original entry on oeis.org

1, 1, 2, 4, 10, 24, 70, 192, 576, 1890, 6300, 21600, 78624, 294840, 1140480, 4561920, 18849600, 79968000, 348566400, 1559376000, 7147140000, 33522128640, 160745472000, 787652812800, 3938264064000, 20080974513600, 104348244639744, 552160113120000, 2973491173785600, 16286186592000000, 90678987245246400
Offset: 1

Views

Author

Keywords

Examples

			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.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)
  • Python
    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
    
  • Python
    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

Formula

a(n) = A127180(n) - A200744(n) = A200744(n) - A038667(n) = (A127180(n) - A038667(n)) / 2. - Max Alekseyev, Jun 18 2022

Extensions

a(24)-a(30) from Alois P. Heinz, Nov 22 2011
a(31) from Michael S. Branicky, May 21 2021

A061032 Factorial splitting: write n! = x*y*z with x

Original entry on oeis.org

3, 4, 6, 10, 21, 36, 81, 168, 360, 810, 1872, 4480, 11088, 27720, 71280, 186368, 496128, 1347192, 3720960, 10407936, 29576988, 85322160, 249500160, 738904320, 2216712960, 6732000000, 20680540160, 64260000000, 201860859375
Offset: 3

Views

Author

Ed Pegg Jr, May 25 2001

Keywords

Comments

We first maximize x and then minimize z, which may be different from doing the opposite way around. For example, 7! = 15*16*21 = 14*18*20 is the case when absolute maximum of x (=15) and absolute minimum of z (=20) cannot be achieved together. - Max Alekseyev, Jun 18 2022

References

  • Luc Kumps, personal communication.

Crossrefs

Extensions

a(10) and a(11) corrected and a(14)-a(31) from Donovan Johnson, May 11 2010
Definition and a(14), a(18), a(24) are corrected by Max Alekseyev, Apr 10 2022

A061031 Factorial splitting: write n! = x*y*z with x

Original entry on oeis.org

2, 3, 5, 9, 16, 35, 70, 150, 336, 770, 1848, 4455, 10920, 27648, 70720, 185895, 496125, 1344000, 3706560, 10395840, 29568000, 85299200, 249356800, 738840960, 2216522880, 6730407936, 20678434920, 64248260076, 201838500864
Offset: 3

Views

Author

Ed Pegg Jr, May 25 2001

Keywords

Comments

We first maximize x and then minimize z, which may be different from doing the opposite way around. For example, 7! = 15*16*21 = 14*18*20 is the case when absolute maximum of x (=15) and absolute minimum of z (=20) cannot be achieved together. - Max Alekseyev, Jun 18 2022

References

  • Luc Kumps, personal communication.

Crossrefs

Extensions

a(10) and a(11) corrected and a(14)-a(31) from Donovan Johnson, May 11 2010
Definition and a(14), a(18), a(24) are corrected by Max Alekseyev, Apr 10 2022

A038667 Minimal value of |product(A) - product(B)| where A and B are a partition of {1,2,3,...,n}.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 6, 2, 18, 54, 30, 36, 576, 576, 840, 6120, 24480, 20160, 93696, 420480, 800640, 1305696, 7983360, 80313120, 65318400, 326592000, 2286926400, 3002360256, 13680979200, 37744574400, 797369149440, 1763653953600, 16753029012720, 16880461678080, 10176199188480, 26657309952000
Offset: 0

Views

Author

Keywords

Comments

Conjecture: The sequence of rational numbers A061057(n)/a(n) has 1 as a limit point. Question: What other limit points does the sequence have? - Richard Peterson, Jul 13 2023

Examples

			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) = 79200 - 78624 = 576.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local l, ll, g, gg, 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])); gg:= g(1, nops(l), 1); ll[n]/gg -gg end: a(0):=0:
    seq(a(n), n=0..20); #  Alois P. Heinz, Jul 09 2009, revised Oct 17 2015
  • Mathematica
    a[n_] := Module[{l, ll, g, gg, p, i}, l = Range[n]; ll = Array[Factorial, n]; g[m_, j_, b_] := g[m, j, b] = Module[{mm, bb, k}, If[j==1, m, mm=m; bb=b; For[k=1, mm bb , bb = Max[bb, g[mm, j-1, bb]]]; mm = mm*l[[j]]]; bb]]; p = Ceiling[Sqrt[ ll[[n]]]]; gg = g[1, Length[l], 1]; ll[[n]]/gg - gg]; a[0]=0; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 0, 35}] (* Jean-François Alcover, Feb 29 2016, after Alois P. Heinz *)
  • Python
    from math import prod, factorial
    from itertools import combinations
    def A038667(n):
        m = factorial(n)
        return 0 if n == 0 else min(abs((p:=prod(d))-m//p) for l in range(n,n//2,-1) for d in combinations(range(1,n+1),l)) # Chai Wah Wu, Apr 06 2022

Formula

a(n) = A200744(n) - A200743(n) = (A200744(n)^2 - A200743(n)^2) / A127180(n). - Max Alekseyev, Apr 08 2022
a(n) >= A061057(n).

Extensions

a(28)-a(31) from Alois P. Heinz, Jul 09 2009
a(1) and examples from Franklin T. Adams-Watters, Nov 22 2011
a(32)-a(33) from Alois P. Heinz, Nov 23 2011
a(34)-a(35) from Alois P. Heinz, Oct 17 2015

A127180 a(n) = smallest possible (product of b(k)'s + product of c(k)'s), where the positive integers <= n are partitioned somehow into {b(k)} and {c(k)}.

Original entry on oeis.org

2, 2, 3, 5, 10, 22, 54, 142, 402, 1206, 3810, 12636, 43776, 157824, 590520, 2287080, 9148320, 37719360, 160029696, 697553280, 3119552640, 14295585696, 67052240640, 321571257120, 1575370944000, 7876854720000, 40164235953600
Offset: 0

Views

Author

Leroy Quet, Jan 07 2007

Keywords

Comments

The maximum (product of b(k)'s + product of c(k)'s) occurs, for n>=2, when {b(k)} = (2,3,4,...n) and {c(k)} = (1). a(1) = 2 because the product over the empty set is defined here as 1.

Examples

			By partitioning (1,2,3,...8) into {b(k)} and {c(k)} so that {b(k)} = (1,4,6,8) and {c(k)} = (2,3,5,7), then (product of b(k)'s + product of c(k)'s) is minimized. Therefore a(8) = 1*4*6*8 + 2*3*5*7 = 402.
		

Crossrefs

Programs

  • Maple
    LQprod := proc(S) if nops(S) = 0 then 1 ; else product(S[i],i=1..nops(S)) ; fi ; end: A127180 := proc(n) local S,m,B,b,c,s,res,i ; res := -1 ; S := {} ; for i from 1 to n do S := S union {i} ; od; for m from 0 to n/2 do B := combinat[permute](n,m) ; for i from 1 to nops(B) do b := op(i,B) ; c := S minus convert(b,set) ; s := LQprod(b)+LQprod(c) ; if res < 0 or s < res then res := s ; fi ; od ; od ; RETURN(res) ; end: for n from 1 to 20 do A127180(n) ; od ; # R. J. Mathar, Jan 10 2007
  • Mathematica
    a[n_] := a[n] = Module[{s, t}, {s, t} = MinimalBy[{#, Complement[Range[n], #]}& /@ Subsets[Range[n]], Abs[Times @@ #[[1]] - Times @@ #[[2]]]&][[1]]; Times @@ s + Times @@ t];
    Table[Print[n, " ", a[n]]; a[n], {n, 0, 24}] (* Jean-François Alcover, May 06 2023 *)

Formula

a(n) <= A060696(n+1) = A076051(n) considering the interleaved partition b={2,4,6,..}, c={1,3,5, 7,...}. - R. J. Mathar, Jan 10 2007
a(n) = A200743(n) + A200744(n) = (A200744(n)^2 - A200743(n)^2) / A038667(n). - Max Alekseyev, Apr 08 2022

Extensions

a(9)-a(13) from R. J. Mathar, Jan 10 2007
a(14)-a(26) from Ray Chandler, Feb 14 2007

A355189 Factorial splitting: write n! = x*y*z with x <= y <= z and minimal z-x; sequence gives value of x.

Original entry on oeis.org

1, 1, 1, 1, 2, 4, 8, 14, 32, 70, 140, 324, 768, 1800, 4368, 10800, 27300, 70560, 184800, 494208, 1343680, 3704400, 10388250, 29560960, 85250880, 249318000, 738720000, 2216160000, 6729074352, 20675655000, 64245312000, 201819656500, 640760440320
Offset: 0

Views

Author

Max Alekseyev, Jun 23 2022

Keywords

Comments

Apparently we have x < y < z for all n > 9. If so, using strict inequalities x < y < z in the definition would make the sequence undefined for n < 3 and affect only a(9) by switching from 9! = 70*72*72 to 9! = 63*72*80.

Crossrefs

A355190 Factorial splitting: write n! = x*y*z with x <= y <= z and minimal z-x; sequence gives value of y.

Original entry on oeis.org

1, 1, 1, 2, 3, 5, 9, 18, 35, 72, 160, 350, 770, 1848, 4455, 10920, 27648, 70720, 185895, 496125, 1344000, 3706560, 10395840, 29568000, 85299200, 249356800, 738840960, 2216522880, 6730407936, 20678434920, 64253314125, 201847852800, 640813814784, 2055410286592, 6658705461408, 21780889600000
Offset: 0

Views

Author

Max Alekseyev, Jun 23 2022

Keywords

Crossrefs

A355191 Factorial splitting: write n! = x*y*z with x <= y <= z and minimal z-x; sequence gives value of z.

Original entry on oeis.org

1, 1, 2, 3, 4, 6, 10, 20, 36, 72, 162, 352, 810, 1872, 4480, 11088, 27720, 71280, 186368, 496128, 1347192, 3720960, 10407936, 29576988, 85322160, 249500160, 738904320, 2216712960, 6732000000, 20680540160, 64257392640, 201852518400, 640832000000, 2055425699250, 6658777165824, 21781337550336
Offset: 0

Views

Author

Max Alekseyev, Jun 23 2022

Keywords

Comments

Apparently we have x < y < z for all n > 9. If so, using strict inequalities x < y < z in the definition would make the sequence undefined for n < 3 and affect only a(9) by switching from 9! = 70*72*72 to 9! = 63*72*80.

Crossrefs

Showing 1-10 of 11 results. Next