%I #40 Feb 26 2024 14:03:28
%S 2,3,5,7,9,11,13,13,17,19,19,23,25,27,29,31,31,31,37,37,41,43,43,47,
%T 49,49,53,53,53,59,61,61,61,67,67,71,73,73,73,79,81,83,83,83,89,89,89,
%U 89,97,97,101,103,103,107,109,109,113,113,113,113
%N Largest prime power dividing binomial(2n, n).
%C 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
%C a(n) = maximum of n-th row in A226078. - _Reinhard Zumkeller_, May 25 2013
%H Charles R Greathouse IV, <a href="/A226047/b226047.txt">Table of n, a(n) for n = 1..10000</a>
%H P. Erdős, <a href="http://www.renyi.hu/~p_erdos/1932-01.pdf">Beweis eines Satzes von Tschebyschef</a> (in German), Acta Litt. Sci. Szeged 5 (1932), pp. 194-198.
%F Erdős proved that a(n) <= 2n.
%e Binomial(10, 5) = 2^2 * 3^2 * 7 and so a(5) = max({2^2, 3^2, 7}) = 3^2.
%p f:= n-> add(i[2]*x^i[1], i=ifactors(n)[2]):
%p a:= proc(n) local p;
%p p:= add(f(n+i) -f(i), i=1..n);
%p max(seq(i^coeff(p, x, i), i=1..degree(p)))
%p end:
%p seq(a(n), n=1..60); # _Alois P. Heinz_, May 24 2013
%t 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 *)
%t Table[Max[Select[Divisors[Binomial[2 n,n]],PrimePowerQ]],{n,60}] (* _Harvey P. Dale_, Feb 26 2024 *)
%o (PARI) ord(n,p)=my(s);while(n\=p,s+=n);s
%o 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 */
%o (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
%o (Haskell)
%o a226047 = maximum . a226078_row -- _Reinhard Zumkeller_, May 25 2013
%Y Cf. A000961, A000984, A060308, A067434, A226083.
%K nonn,nice
%O 1,1
%A _Charles R Greathouse IV_, May 24 2013