OFFSET
1,3
LINKS
Harvey P. Dale, Table of n, a(n) for n = 1..1000
FORMULA
a(2^k)=2^k-1, if n is an odd prime a(n)=(n+1)/2 (but there are also some composites satisfying this property, see A079290).
MAPLE
A073078 := proc(n)
for k from 1 do
if modp(binomial(2*k, k), n) = 0 then
return k;
end if;
end do:
end proc: # R. J. Mathar, Aug 20 2014
MATHEMATICA
lk[n_]:=Module[{k=1}, While[!Divisible[Binomial[2k, k], n], k++]; k]; Array[lk, 90] (* Harvey P. Dale, Oct 09 2012 *)
PROG
(PARI) a(n)=if(n<0, 0, s=1; while(binomial(2*s, s)%n>0, s++); s)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Aug 17 2002
STATUS
approved