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.

A226047 Largest prime power dividing binomial(2n, n).

Original entry on oeis.org

2, 3, 5, 7, 9, 11, 13, 13, 17, 19, 19, 23, 25, 27, 29, 31, 31, 31, 37, 37, 41, 43, 43, 47, 49, 49, 53, 53, 53, 59, 61, 61, 61, 67, 67, 71, 73, 73, 73, 79, 81, 83, 83, 83, 89, 89, 89, 89, 97, 97, 101, 103, 103, 107, 109, 109, 113, 113, 113, 113
Offset: 1

Views

Author

Keywords

Comments

The first indices n for which a(n) < a(n-1) are 123, 315, 366, 671, 1095, 1098, 1204, 1565, 6095, 7326, 9843, 39065, 58828, 88575, 88578, 195315, 195320, 265722, 265725 and 709937. - Giovanni Resta, May 24 2013
a(n) = maximum of n-th row in A226078. - Reinhard Zumkeller, May 25 2013

Examples

			Binomial(10, 5) = 2^2 * 3^2 * 7 and so a(5) = max({2^2, 3^2, 7}) = 3^2.
		

Crossrefs

Programs

  • Haskell
    a226047 = maximum . a226078_row  -- Reinhard Zumkeller, May 25 2013
  • Maple
    f:= n-> add(i[2]*x^i[1], i=ifactors(n)[2]):
    a:= proc(n) local p;
          p:= add(f(n+i) -f(i), i=1..n);
          max(seq(i^coeff(p, x, i), i=1..degree(p)))
        end:
    seq(a(n), n=1..60);  # Alois P. Heinz, May 24 2013
  • Mathematica
    cnt[n_, p_] := (n - Total@IntegerDigits[n, p])/(p-1); a[n_] := Block[{k = 2*n, p, e}, While[! PrimePowerQ[k] || ({p, e} = FactorInteger[k][[1]]; cnt[2*n , p] - 2 cnt[n, p] != e), k--]; k]; Array[a, 60] (* Giovanni Resta, May 24 2013 *)
    Table[Max[Select[Divisors[Binomial[2 n,n]],PrimePowerQ]],{n,60}] (* Harvey P. Dale, Feb 26 2024 *)
  • PARI
    ord(n,p)=my(s);while(n\=p,s+=n);s
    a(n)=my(p=precprime(2*n));forstep(k=2*n,p+1,-1, my(q,e=isprimepower(k, &q)); if(e && e == ord(2*n,q)-2*ord(n,q), return(k)));p /* requires PARI v.2.5 or later */
    
  • PARI
    A226047(n)={for(k=2,#n=factor(binomial(2*n,n))~,factorback(n[,k-1]~)>factorback(n[,k]~) && n[,k]=n[,k-1]);factorback(n[,#n]~)} \\ highly unoptimized, not suitable for n>>10^4. - M. F. Hasler, May 24 2013
    

Formula

Erdős proved that a(n) <= 2n.