login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260636 a(n) = binomial(3n, n) mod n. 3

%I #26 Sep 08 2022 08:46:13

%S 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,

%T 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,

%U 44,3,0,3,46,45,47,39,51,3,53,15,0,3,45,3,15,9,20,76,0,3,7,3

%N a(n) = binomial(3n, n) mod n.

%C Motivated by A080469: C(3n,n)=3^n (mod n), A109641, A109642 and other sequences.

%C See A059288 for the "2n" analog. Sequence A260640 yields the indices of zeros (analog to A014847 for 2n).

%H Chai Wah Wu, <a href="/A260636/b260636.txt">Table of n, a(n) for n = 1..10000</a>

%H M. Alekseyev, <a href="http://home.gwu.edu/~maxal/gpscripts/">PARI/GP Scripts for Miscellaneous Math Problems</a>, sect. III: Binomial coefficients modulo integers, binomod.gp (Vers. 1.4, 11/2015).

%e n=1: C(3,1) = 3 = 0 (mod 1).

%e n=2: C(3*2,2) = 15 = 1 (mod 2).

%e n=3: C(3*3,3) = 84 = 0 (mod 3).

%e n=4: C(3*4,4) = 495 = 3 (mod 4).

%p A260636:=n->binomial(3*n,n) mod n: seq(A260636(n), n=1..100); # _Wesley Ivan Hurt_, Nov 12 2015

%t Array[Mod[Binomial[3 #, #], #] &, 112] (* _Michael De Vlieger_, Nov 12 2015 *)

%o (PARI) a(n)=binomial(3*n,n)%n

%o (PARI) A260636(n)=lift(binomod(3*n,n,n)) \\ using binomod.gp by M. Alekseyev, cf. Links.

%o (Magma) [Binomial(3*n,n) mod n : n in [1..100]]; // _Wesley Ivan Hurt_, Nov 12 2015

%o (Python)

%o from __future__ import division

%o A260636_list, b = [], 3

%o for n in range(1,10001):

%o A260636_list.append(b % n)

%o b = b*3*(3*n+2)*(3*n+1)//((2*n+2)*(2*n+1)) # _Chai Wah Wu_, Jan 27 2016

%Y Cf. A080469, A109641, A109642; A260640 (indices of zeros); A059288, A014847 (analogs for 2n).

%K nonn,easy

%O 1,4

%A _M. F. Hasler_, Nov 11 2015

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 16 08:10 EDT 2024. Contains 374345 sequences. (Running on oeis4.)