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

A060795 Write product of first n primes as x*y with x

Original entry on oeis.org

1, 2, 5, 14, 42, 165, 714, 3094, 14858, 79534, 447051, 2714690, 17395070, 114371070, 783152070, 5708587335, 43848093003, 342444658094, 2803119896185, 23619540863730, 201813981102615, 1793779293633437, 16342050964565645, 154170926013430326, 1518409177581024365
Offset: 1

Views

Author

Labos Elemer, Apr 27 2001

Keywords

Comments

Or, lower central divisor of n-th primorial.
Subsequence of A005117 (squarefree numbers). - Michel Marcus, Feb 22 2016

Examples

			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.
		

Crossrefs

Programs

  • Maple
    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
  • Mathematica
    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 *)
  • PARI
    a(n) = my(m=prod(i=1, n, prime(i))); divisors(m)[numdiv(m)\2]; \\ Michel Marcus, Feb 22 2016

Formula

a(n) = A060775(A002110(n)). - Labos Elemer, Apr 27 2001
a(n) = A002110(n)/A060796(n). - M. F. Hasler, Mar 21 2022

Extensions

More terms from Ed Pegg Jr, May 28 2001
a(16)-a(23) computed by Jud McCranie, Apr 15 2000
a(24) and a(25) from Robert Israel, Feb 22 2016
a(25) corrected by Jean-François Alcover, Oct 15 2016
a(26)-a(33) in b-file from Amiram Eldar, Apr 09 2020
Up to a(38) using b-file of A060796, by M. F. Hasler, 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

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

Original entry on oeis.org

1, 2, 3, 6, 12, 30, 72, 210, 630, 1920, 6336, 22176, 79200, 295680, 1146600, 4586400, 18869760, 80061696, 348986880, 1560176640, 7148445696, 33530112000, 160825785120, 787718131200, 3938590656000, 20083261440000, 104351247000000, 552173794099200, 2973528918360000, 16286983961149440
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) = 79200.
		

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])); 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]]; Max[Times @@ s, Times @@ t]];
    Table[Print[n, " ", a[n]];
    a[n], {n, 1, 25}] (* Jean-François Alcover, Nov 07 2020 *)
  • Python
    from math import prod, factorial
    from itertools import combinations
    def A200744(n):
        m = factorial(n)
        return min((abs((p:=prod(d))-m//p),max(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) - A200743(n) = A038667(n) + A200743(n) = (A038667(n) + A127180(n)) / 2. - Max Alekseyev, Jun 18 2022

Extensions

a(24)-a(30) from Alois P. Heinz, Nov 22 2011

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