cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A260636 a(n) = binomial(3n, n) mod n.

Original entry on oeis.org

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

Views

Author

M. F. Hasler, Nov 11 2015

Keywords

Comments

Motivated by A080469: C(3n,n)=3^n (mod n), A109641, A109642 and other sequences.
See A059288 for the "2n" analog. Sequence A260640 yields the indices of zeros (analog to A014847 for 2n).

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).
		

Crossrefs

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

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