login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A099905
a(n) = binomial(2n-1, n-1) mod n.
8
0, 1, 1, 3, 1, 0, 1, 3, 1, 8, 1, 2, 1, 10, 0, 3, 1, 12, 1, 10, 3, 14, 1, 6, 1, 16, 10, 0, 1, 2, 1, 3, 21, 20, 21, 26, 1, 22, 10, 10, 1, 0, 1, 24, 0, 26, 1, 30, 1, 28, 27, 48, 1, 30, 16, 44, 48, 32, 1, 48, 1, 34, 6, 35, 35, 0, 1, 18, 33, 20, 1, 18, 1, 40, 60, 16, 0, 72, 1, 10, 10, 44, 1, 56, 75
OFFSET
1,4
COMMENTS
For p prime, a(p)=1. For n in A058008, a(n)=0.
For n the square of a prime p>=3 or the cube of a prime p>=5, a(n)=1. - Franz Vrabec, Mar 26 2008
For n in A228562, a(n)=1. - Felix Fröhlich, Oct 17 2015
LINKS
R. J. McIntosh, On the converse of Wolstenholme's theorem, Acta Arithmetica 71 (4): 381-389, (1995).
EXAMPLE
a(11) = 352716 mod 11 = 1.
MAPLE
A099905:=n->binomial(2*n-1, n-1) mod n: seq(A099905(n), n=1..100); # Wesley Ivan Hurt, Oct 17 2015
MATHEMATICA
Table[Mod[Binomial[2n-1, n-1], n], {n, 90}] (* Harvey P. Dale, Dec 12 2011 *)
PROG
(PARI) a(n) = lift(Mod(binomial(2*n-1, n-1), n)) \\ Felix Fröhlich, Oct 17 2015
(Magma) [Binomial(2*n-1, n-1) mod n : n in [1..100]]; // Wesley Ivan Hurt, Oct 17 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Henry Bottomley, Oct 29 2004
STATUS
approved