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-8 of 8 results.

A060777 Larger central (or median) divisor of n!.

Original entry on oeis.org

1, 2, 3, 6, 12, 30, 72, 210, 630, 1920, 6336, 22176, 78975, 295680, 1144000, 4576000, 18869760, 80061696, 348986880, 1560176640, 7148445696, 33530112000, 160813154304, 787718131200, 3938590656000, 20083261440000, 104351051284480, 552173794099200, 2973519499493376, 16286922357866496, 90680032493568000, 512971179263262720
Offset: 1

Views

Author

Labos Elemer, Apr 26 2001

Keywords

Comments

Factorial splitting: write n! = x*y with x <= y and x maximal; sequence gives value of y. Inequality "x < y" gives the same sequence, except that a(1) is not defined.
The integer part of square root of n! (A055226(n)) is situated between x and y.

Examples

			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.
		

Crossrefs

Programs

  • Mathematica
    Table[ Part[ Divisors[ w! ], 1+Floor[ DivisorSigma[ 0, n! ]/2 ] ], {w, a, b} ]

Formula

a(n) = A033677(A000142(n)). - Pontus von Brömssen, Jul 15 2023
Sum_{k=1..n} a(k) = sqrt(n!) * (1 + O(1/n^c)), where c < 1 is a positive constant (De Koninck and Verreault, 2024, p. 48, Theorem 2.1). - Amiram Eldar, Dec 10 2024

Extensions

More terms from Don Reble, Dec 13 2001

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

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

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

Original entry on oeis.org

1, 1, 1, 1, 13, 17, 1, 41, 157, 1811, 1579, 18859, 95533, 17659, 1995293, 208303, 2396687, 58513111, 299808329, 2460653813, 3952306763, 341777053, 115405393057, 437621467859, 1009861675153, 6660853109087, 29075165225531
Offset: 1

Views

Author

Ed Pegg Jr, May 28 2001

Keywords

Examples

			a(4)=1: 2*3*5*7 = 210 = 14*15, so we can take x=14, y=15, with difference of 1.
Also: n=3: 2*3-5=1; n=4: 3*5-2*7=1; n=5: 5*11-2*3*7=13; n=6: 2*7*13-3*5*11=17; n=7: 5*11*13-2*3*7*17=1; n=8: 3*5*11*19-2*7*13*17=41
		

Crossrefs

Programs

  • Maple
    A061060aux := proc(l1,l2) local resul ; resul := product(l1[i],i=1..nops(l1)) ; resul := resul-product(l2[i],i=1..nops(l2)) ; RETURN(abs(resul)) ; end:
    A061060 := proc(n) local plist,i,subl,resul,j,l1,l2,k,d ; plist := [] ; resul := 1 ; for i from 1 to n do resul := resul*ithprime(i) ; plist := [op(plist), ithprime(i)] ; od; for i from 1 to n/2 do subl := combinat[choose](plist,i) ; for j from 1 to nops(subl) do l1 := op(j,subl) ; l2 := convert(plist,set) minus convert(l1,set) ; d := A061060aux(l1,l2) ; if d < resul then resul := d ; fi ; od; od ; RETURN(resul) ; end:
    for n from 3 to 19 do printf("%d,",A061060(n)) ; od ; # R. J. Mathar, Aug 26 2006 [This Maple program was attached to A121315. However I think it belongs here, so I renamed the variables and moved it to this entry. - N. J. A. Sloane, Sep 16 2005]
  • Mathematica
    (* first do *) Needs["DiscreteMath`Combinatorica`"] (* then *) f[n_] := Block[{arrayofnprimes = Array[Prime, n], primorial = Times @@ Array[Prime, n], diffmin = Infinity, adiff, sub}, If[n == 1, 1, Do[sub = Times @@ NthSubset[i, arrayofnprimes]; adiff = Abs[primorial/sub - sub]; If[adiff < diffmin, diffmin = adiff], {i, 2, 2^n/2}]; diffmin]]; Do[ Print@f@n, {n, 30}] (* Robert G. Wilson v, Sep 14 2006 *)

Formula

Conjecture: Limit_{N->oo} (Sum_{n=1..N} log(a(n))) / (Sum_{n=1..N} prime(n)) = 1/e (A068985). - Alain Rocchelli, Nov 13 2023

Extensions

Terms a(16)-a(45) in b-file computed by Jud McCranie, Apr 15 2000; Jan 12 2016
a(46)-a(60) in b-file from Don Reble, Jul 11 2020
a(61)-a(70) in b-file from Max Alekseyev, Apr 20 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

A352813 Minimum difference |product(A) - product(B)| where A and B are a partition of {1,2,3,...,2*n} and |A| = |B| = n.

Original entry on oeis.org

0, 1, 2, 6, 18, 30, 576, 840, 24480, 93696, 800640, 7983360, 65318400, 2286926400, 13680979200, 797369149440, 16753029012720, 10176199188480, 159943859712000, 26453863460044800, 470500040794291200, 20720967220237197312, 61690805562507264000
Offset: 0

Views

Author

Peter J. Taylor, Apr 04 2022

Keywords

Comments

a(n) >= A038667(2*n).
Conjecture: a(n) = A038667(2*n) for all n. It is verified for n<=70. - Max Alekseyev, Jun 18 2022
Bernardo Recamán Santos proposes that this should be called Luciana's sequence for the student whose question prompted its investigation. (See MathOverflow link below.)

Examples

			For n = 4, the partition A = {1,5,6,7} and B = {2,3,4,8} is optimal, giving difference 1*5*6*7 - 2*3*4*8 = 18.
_Rob Pratt_ computed the optimal solutions for n <= 10:
[ n]    a(n)                   partitions of 2n
------------------------------------------------------------------
[ 1]       1                         2 | 1
[ 2]       2                       2,3 | 1,4
[ 3]       6                     1,5,6 | 2,3,4
[ 4]      18                   1,5,6,7 | 2,3,4,8
[ 5]      30                2,3,4,8,10 | 1,5,6,7,9
[ 6]     576              1,4,7,8,9,11 | 2,3,5,6,10,12
[ 7]     840           2,4,5,6,8,11,14 | 1,3,7,9,10,12,13
[ 8]   24480        1,5,6,7,8,13,14,15 | 2,3,4,9,10,11,12,16
[ 9]   93696     2,3,6,8,9,11,12,13,18 | 1,4,5,7,10,14,15,16,17
[10]  800640  2,3,4,8,9,11,12,18,19,20 | 1,5,6,7,10,13,14,15,16,17
		

Crossrefs

Programs

  • Python
    from math import prod, factorial
    from itertools import combinations
    def A352813(n):
        m = factorial(2*n)
        return 0 if n == 0 else min(abs((p:=prod(d))-m//p) for d in combinations(range(2,2*n+1),n-1)) # Chai Wah Wu, Apr 06 2022
  • Sage
    def A352813(n):
        return min(abs(prod(A)-prod(B)) for (A,B) in SetPartitions((1..2*n), [n,n]))
    [A352813(n) for n in (1..10)] # Freddy Barrera, Apr 05 2022
    

A323728 a(n) is the smallest number k such that both k-2*n and k+2*n are squares.

Original entry on oeis.org

2, 5, 10, 8, 26, 13, 50, 20, 18, 29, 122, 25, 170, 53, 34, 32, 290, 45, 362, 41, 58, 125, 530, 52, 50, 173, 90, 65, 842, 61, 962, 80, 130, 293, 74, 72, 1370, 365, 178, 89, 1682, 85, 1850, 137, 106, 533, 2210, 100, 98, 125, 298, 185, 2810, 117, 146, 113, 370
Offset: 1

Views

Author

Daniel Suteu, Jan 25 2019

Keywords

Comments

When n is a prime number, a(n) is greater than all the previous terms.
If n = 4*x*y, then a(n) is the smallest integer solution of the form 4*(x^2 + y^2), with rational values x and y.

Examples

			For n = 3, a(3) = 10, which is the smallest integer k such that k+2*n and k-2*n are both squares: 10+2*3 = 4^2 and 10-2*3 = 2^2.
For n=1..10, the following {a(n)-2*n, a(n)+2*n} pairs of squares are produced: {0, 4}, {1, 9}, {4, 16}, {0, 16}, {16, 36}, {1, 25}, {36, 64}, {4, 36}, {0, 36}, {9, 49}.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d;
    d:= max(select(t -> t^2 <= n, numtheory:-divisors(n)));
    d^2 + (n/d)^2
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 17 2019
  • Mathematica
    Array[Block[{k = 1}, While[Nand @@ Map[IntegerQ, Sqrt[k + 2 {-#, #}]], k++]; k] &, 57] (* Michael De Vlieger, Feb 17 2019 *)
  • PARI
    a(n) = for(k=2*n, oo, if(issquare(k+2*n) && issquare(k-2*n), return(k)));
    
  • PARI
    a(n) = my(d=divisors(n)); vecmin(vector(#d, k, 4*((d[k]/2)^2 + (n/d[k]/2)^2)));

Formula

a(n^2) = 2 * n^2.
a(p) = p^2 + 1, for p prime.
a(n) = A063655(n)^2 - 2*n.
a(n) = A056737(n)^2 + 2*n.
a(n!) = A061057(n)^2 + 2*n!.
a(n) = A033676(n)^2 + A033677(n)^2. - Robert Israel, Feb 17 2019
a(n) = Min_{d|n} ((n/d)^2 + d^2). - Ridouane Oudra, Mar 17 2024

A317490 a(n) = min {i - j} where i*j is a factorization of the n-th partial product of the semiprimes (A112141).

Original entry on oeis.org

0, 2, 6, 3, 12, 3, 126, 153, 765, 1050, 5348, 14850, 85050, 501200, 91280, 3661983, 25633881, 66271296, 215467945, 254861640, 5311480020, 75327142968, 122703152000, 2187956957004, 3449084839200, 19305922856220, 11327171375520, 58038845751810, 2222926571960640
Offset: 1

Views

Author

Robert G. Wilson v, Jul 29 2018

Keywords

Examples

			a(1) =   0 since the first semiprime is    4 =    2 *    2;
a(2) =   2 since 4*6               =      24 =    4 *    6;
a(3) =   6 since 4*6*9             =     216 =   12 *   18;
a(4) =   3 since 4*6*9*10          =    2160 =   45 *   48;
a(5) =  12 since 4*6*9*10*14       =   30240 =  168 *  180;
a(6) =   3 since 4*6*9*10*14*15    =  453600 =  172 *  175;
a(7) = 126 since 4*6*9*10*14*15*21 = 9525600 = 3024 * 3150; etc.
		

Crossrefs

Inspired by A003681, and analogous to A061057 and A061060.
Cf. A112141.

Programs

  • Mathematica
    SemiPrimePi[n_] := Sum[PrimePi[n/Prime[i]] - i + 1, {i, PrimePi[Sqrt[n]]}]; SemiPrime[n_] := Block[{e = Floor[Log[2, n] + 1], a, b}, a = 2^e; Do[b = 2^p; While[SemiPrimePi@a < n, a = a + b]; a = a - b/2, {p, e, 0, -1}]; a + b/2]; a[n_] := Block[{sp = Times @@ Array[SemiPrime@# &, n], d}, d = DivisorSigma[0, sp]/2; -Subtract @@  Take[ Divisors@ sp, {d, d + 1}]]; a[1] = 0; Array[a, 29]
Showing 1-8 of 8 results.