A260636 a(n) = binomial(3n, n) mod n.
0, 1, 0, 3, 3, 0, 3, 7, 3, 5, 3, 0, 3, 8, 9, 15, 3, 15, 3, 15, 0, 4, 3, 12, 3, 2, 3, 12, 3, 24, 3, 15, 18, 15, 0, 9, 3, 34, 6, 31, 3, 21, 3, 0, 15, 38, 3, 36, 3, 40, 33, 40, 3, 42, 0, 16, 27, 44, 3, 0, 3, 46, 45, 47, 39, 51, 3, 53, 15, 0, 3, 45, 3, 15, 9, 20, 76, 0, 3, 7, 3
Offset: 1
Examples
n=1: C(3,1) = 3 = 0 (mod 1). n=2: C(3*2,2) = 15 = 1 (mod 2). n=3: C(3*3,3) = 84 = 0 (mod 3). n=4: C(3*4,4) = 495 = 3 (mod 4).
Links
- Chai Wah Wu, Table of n, a(n) for n = 1..10000
- M. Alekseyev, PARI/GP Scripts for Miscellaneous Math Problems, sect. III: Binomial coefficients modulo integers, binomod.gp (Vers. 1.4, 11/2015).
Crossrefs
Programs
-
Magma
[Binomial(3*n,n) mod n : n in [1..100]]; // Wesley Ivan Hurt, Nov 12 2015
-
Maple
A260636:=n->binomial(3*n,n) mod n: seq(A260636(n), n=1..100); # Wesley Ivan Hurt, Nov 12 2015
-
Mathematica
Array[Mod[Binomial[3 #, #], #] &, 112] (* Michael De Vlieger, Nov 12 2015 *)
-
PARI
a(n)=binomial(3*n,n)%n
-
PARI
A260636(n)=lift(binomod(3*n,n,n)) \\ using binomod.gp by M. Alekseyev, cf. Links.
-
Python
from _future_ import division A260636_list, b = [], 3 for n in range(1,10001): A260636_list.append(b % n) b = b*3*(3*n+2)*(3*n+1)//((2*n+2)*(2*n+1)) # Chai Wah Wu, Jan 27 2016
Comments