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

A356637 a(n) = A000265(A263931(n)).

Original entry on oeis.org

1, 1, 1, 1, 1, 9, 3, 3, 45, 5, 1, 21, 7, 175, 675, 45, 45, 1485, 5775, 5775, 45045, 2145, 195, 8775, 2925, 5733, 22491, 833, 6545, 373065, 24871, 24871, 1566873, 3086265, 181545, 357903, 39767, 39767, 156975, 309925, 61985, 5020785, 239085, 20322225, 160730325
Offset: 0

Views

Author

Peter Luschny, Sep 07 2022

Keywords

Comments

Let n >= 5. If a(n) is squarefree, then 2 divides binomial(2*n, n) more than once and is the only prime that does so. There is only a finite number of such cases (see A059097).
An efficient algorithm for the calculation is available, which is based on prime factorization. See the SageMath implementation. The main application is the efficient calculation of the central binomial coefficient, which is the product of this sequence, the Glaisher/Gould sequence, and the upper primorial function (see the formula section).
Since the central binomial coefficient is a bisection of the swinging factorial A056040, and the swinging factorial, in turn, is the building block for an efficient algorithm for the computation of the factorial function, the terms of this sequence occur as factors in all these computations. See the links for details.

Examples

			Let n = 22 and consider the prime factorization of m = binomial(2*n, n):
2^3 * [3 * 5 * 13] * 23 * 29 * 31 * 37 * 41 * 43. Then a(22) = 3 * 5 * 13. This is what is left after the 'prime tail' A261130(n) and the 'prime head' A006519(m) = A001316(n) have been cut off.
		

Crossrefs

Programs

  • Maple
    A263931 := n -> binomial(2*n, n) / convert(select(isprime, {$n+1..2*n}), `*`):
    A000265 := n -> n / 2^padic[ordp](n, 2):
    seq(A000265(A263931(n)), n = 0..45);
  • SageMath
    def A356637(n: int) -> int:
        m = 2 * n
        if m < 5: return 1
        sqrtm = isqrt(m) + 1
        R = prime_range(sqrtm, m // 3 + 1)
        factors = [x for x in R if is_odd(m // x)]
        for prime in prime_range(3, sqrtm):
            p: int = 1
            q: int = m
            while True:
                q //= prime
                if q == 0:
                    break
                if q & 1 == 1:
                    p *= prime
            if p > 1:
                factors.append(p)
        return product(factors)
    print([A356637(n) for n in range(45)])

Formula

A000984(n) = a(n) * A001316(n) * A261130(n) for n >= 2.

A261130 a(n) = Product(p prime | n < p <= 2*n).

Original entry on oeis.org

1, 2, 3, 5, 35, 7, 77, 143, 143, 2431, 46189, 4199, 96577, 7429, 7429, 215441, 6678671, 392863, 392863, 765049, 765049, 31367009, 1348781387, 58642669, 2756205443, 2756205443, 2756205443, 146078888479, 146078888479, 5037203051, 297194980009, 584803025179
Offset: 0

Views

Author

Peter Luschny, Oct 31 2015

Keywords

Comments

Essentially the same as A068111. - R. J. Mathar, Nov 23 2015
a(n) is a divisor of binomial(2*n, n); the quotient binomial(2*n, n) / a(n) is A263931(n). - Robert FERREOL, Sep 03 2022

Examples

			a(0) = 1 because the empty product is 1 by convention.
a(4) = 35 because {p prime | 4 < p <= 8} = {5, 7}.
		

Crossrefs

Cf. A000984 (binomial(2*n,n)), A034386, A263931, A356637.

Programs

  • Maple
    a := n -> convert(select(isprime, {$n+1..2*n}),`*`):
    print(seq(a(n), n=0..31));
  • Mathematica
    Join[{1},Table[Times@@Prime[Range[PrimePi[n]+1,PrimePi[2n]]],{n,40}]] (* Harvey P. Dale, May 09 2017 *)
  • PARI
    A261130(n,P=1)={forprime(p=n+1,2*n,P*=p);P} \\ M. F. Hasler, Nov 25 2015
    
  • Python
    from sympy import primorial
    def A261130(n): return primorial(n<<1,nth=False)//primorial(n,nth=False) if n else 1 # Chai Wah Wu, Sep 07 2022

A135322 a(n) = gcd(n!, binomial(2n,n)).

Original entry on oeis.org

1, 1, 2, 2, 2, 12, 12, 24, 90, 20, 4, 168, 28, 1400, 5400, 720, 90, 5940, 23100, 46200, 180180, 17160, 1560, 140400, 11700, 45864, 179928, 13328, 52360, 5969040, 397936, 795872, 3133746, 12345060, 726180, 2863224, 159068, 318136, 1255800, 4958800
Offset: 0

Views

Author

Leroy Quet, Dec 06 2007

Keywords

Examples

			a(5) = 12 as gcd(5!, binomial(2*5, 5)) = gcd(120, 252) = 12. - _David A. Corneth_, Apr 03 2021
		

Crossrefs

Programs

  • Mathematica
    Table[GCD[n!, Binomial[2n, n]], {n, 0, 60}] (* Stefan Steinerberger, Dec 07 2007 *)
  • PARI
    valp(n,p)=my(s); while(n\=p, s+=n); s
    a(n)=my(s=1,t); forprime(p=2,n, t=valp(n,p); t=min(t,valp(2*n,p)-2*t); if(t, s*=p^t)); s \\ Charles R Greathouse IV, Oct 09 2016

Extensions

More terms from Stefan Steinerberger, Dec 07 2007

A361077 a(n) = largest sqrt(2*n)-smooth divisor of binomial(2*n, n).

Original entry on oeis.org

1, 1, 2, 4, 2, 36, 12, 24, 18, 4, 4, 24, 4, 200, 5400, 720, 90, 540, 300, 600, 180, 120, 120, 10800, 900, 3528, 10584, 784, 280, 1680, 112, 224, 882, 2940, 2940, 504, 28, 56, 4200, 19600, 980, 158760, 7560, 75600, 113400, 5040, 35280, 211680, 44100, 1800, 648, 432, 216, 45360, 1680
Offset: 0

Views

Author

Matthieu Pluntz, Mar 01 2023

Keywords

Comments

The highest exponent in the prime factorization of a(n) is A263922(n), for n >= 2.
a(n) is even for n >= 2.
Binomial(2*n, n)/a(n) and A263931(n)/a(n) are coprime with a(n) and squarefree. By the Erdős squarefree conjecture, proved in 1996, no a(n) with n >= 5 is squarefree.

Examples

			binomial(10, 5) = 2^2*3^2*7. 2,3 <= sqrt(10), 7 > sqrt(10) so a(5) = 2^2*3^2 = 36.
		

Crossrefs

Programs

  • PARI
    a(n) = my(m=sqrtint(2*n), f=factor(binomial(2*n, n), m+1)); for (k=1, #f~, if (f[k,1]>m, f[k,1]=1)); factorback(f); \\ Michel Marcus, Mar 03 2023
  • R
    library(primes)
    n = 2*10^4
    pp = generate_primes(max = sqrt(n))
    npinb = list()
    for(p in pp){
      np = rep(0,n)
      for(t in 1:(log(n)/log(p))) np[p*(1:(n/p))] = np[1:(n/p)] + 1 #multiplicities of prime factor p in the integers
      npinb[[as.character(p)]] = cumsum(np)[2*(1:(n/2))] - 2*cumsum(np[1:(n/2)]) #multiplicities of prime factor p in the central binomial coefficients
    }
    res = rep(1,n/2)
    for(p in pp){
      select = p^2 <= 2*(1:(n/2))
      res[select] = res[select]*p^npinb[[as.character(p)]][select]
    }
    #offset of res is 1
    

Formula

a(n) = binomial(2*n, n) / Product(p prime | p^2 > 2*n, floor(2*n/p) is odd).
Showing 1-4 of 4 results.