OFFSET
1,1
COMMENTS
For prime p > sqrt(2n), p^2 does not divide binomial(2n,n).
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000 (first 60 terms from T. D. Noe)
FORMULA
a(n) = (prime(n)^2+1)/2 for n > 1.
a(n) = A066885(n), n > 1. - R. J. Mathar, Aug 18 2008
MATHEMATICA
t=Table[f=FactorInteger[Binomial[2n, n]]; s=Select[f, #[[2]]>1&]; If[s=={}, 0, s[[ -1, 1]]], {n, 100}]; Table[p=Prime[i]; First[Flatten[Position[t, p]]], {i, PrimePi[Max[t]]}]
lk[n_]:=Module[{k=1, c=Prime[n]^2}, While[!Divisible[Binomial[2k, k], c], k=k+2]; k]; Array[lk, 40] (* Harvey P. Dale, Oct 10 2012 *)
PROG
(PARI) fv(n, p)=my(s); while(n\=p, s+=n); s
a(n)=my(p=prime(n), k=p^2\2+1); while(fv(2*k, p)-2*fv(k, p)<2, k++); k \\ Charles R Greathouse IV, Mar 27 2014
(PARI) a(n)=prime(n)^2\2+1 \\ Charles R Greathouse IV, Mar 27 2014
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
T. D. Noe, Jul 22 2005
STATUS
approved