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.

Showing 1-4 of 4 results.

A080469 Composite n such that binomial(3*n,n)==3^n (mod n).

Original entry on oeis.org

36, 57, 121, 132, 552, 8397, 7000713, 9692541, 36294723, 564033861
Offset: 1

Views

Author

Benoit Cloitre, Oct 15 2003

Keywords

Comments

If p is prime, binomial(3*p,p)==3^p (mod p)
No other terms below 10^9.
A subsequence of A109641. The terms a(n) with n=2, 6, 7, 8, 9, 10 are of the form 3^k*p where p is prime and k=1, 3, 2, 5, 6, 7, respectively. It is tempting to conjecture that there are (infinitely many?) more terms of that form. - M. F. Hasler, Nov 11 2015

Examples

			57 is a term because binomial(3*57, 57) = 12039059761216294940321619222324879408784636200 mod 57 = 27 == 3^57 mod 57.
		

Crossrefs

Programs

  • Mathematica
    Do[If[ !PrimeQ[n], k = Binomial[3*n, n]; m = 3^n; If[Mod[k, n] == Mod[m, n], Print[n]]], {n, 1, 70000}] (* Ryan Propper, Aug 12 2005 *)
  • PARI
    forcomposite(n=1,1e9, binomod(3*n,n,n)==Mod(3,n)^n && print1(n",")) \\ Cf. Alekseyev link. - M. F. Hasler, Nov 14 2015

Extensions

One more term a(6) from Ryan Propper, Aug 12 2005
Four new terms a(7)-a(10) added by Max Alekseyev, Nov 05 2009

A109641 Composite n such that binomial(3n, n) == 3^k (mod n) for some integer k > 0.

Original entry on oeis.org

4, 9, 15, 25, 27, 34, 36, 49, 51, 57, 63, 68, 75, 81, 87, 93, 111, 121, 125, 129, 132, 138, 141, 153, 155, 159, 169, 177, 237, 249, 258, 261, 264, 267, 274, 276, 279, 289, 298, 303, 324, 339, 343, 357, 361, 375, 381, 387, 393, 411, 417, 423, 441, 447, 453, 477
Offset: 1

Views

Author

Ryan Propper, Aug 05 2005

Keywords

Comments

Includes p^k for k >= 2 and p > 2 in A019334 but not in A014127, as binomial(3n,n) is coprime to p and 3 is a primitive root mod p^k. - Robert Israel, Nov 12 2017

Examples

			Binomial(3*34,34) == 3^6 (mod 34), so 34 is a member.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local p,m,k,t;
      if isprime(n) then return false fi;
      p:= padic:-ordp(n,3);
      p:= p + numtheory:-order(3, n/3^p);
      m:= binomial(3*n,n) mod n;
      t:= 1;
      for k from 1 to p do
        t:= t*3 mod n;
        if t = m then return true fi;
      od:
    false
    end proc;
    select(filter, [$2..1000]); # Robert Israel, Nov 12 2017
  • Mathematica
    okQ[n_] := Module[{p, m}, If[PrimeQ[n], Return[False]]; p = IntegerExponent[n, 3]; p = p + MultiplicativeOrder[3, n/3^p]; m = Mod[Binomial[3n, n], n]; AnyTrue[Range[p], m == PowerMod[3, #, n]&]];
    Select[Range[2, 500], okQ] (* Jean-François Alcover, Mar 27 2019, after Robert Israel *)

Extensions

Corrected and extended by Max Alekseyev, Sep 13 2009
Edited by Max Alekseyev, Sep 20 2009

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

A260640 Numbers n such that binomial(3*n,n) == 0 (mod n).

Original entry on oeis.org

1, 3, 6, 12, 21, 35, 44, 55, 60, 70, 78, 88, 90, 99, 102, 110, 117, 119, 120, 133, 156, 171, 176, 180, 184, 204, 207, 220, 225, 230, 231, 234, 238, 240, 247, 252, 255, 285, 286, 300, 312, 341, 342, 348, 360, 368, 372, 391, 403, 408, 414, 425, 434, 460, 462, 465, 468, 481, 483, 494, 495, 504, 506, 510, 550, 555, 561, 572, 574, 585, 600
Offset: 1

Views

Author

M. F. Hasler, Nov 11 2015

Keywords

Comments

See A014847 for the analog for 2n.

Crossrefs

Programs

  • Magma
    [n: n in [1..600] |Binomial(3*n,n) mod n eq 0]; // Vincenzo Librandi, Jan 29 2016
  • Mathematica
    Select[Range@ 600, Mod[Binomial[3 #, #], #] == 0 &] (* Michael De Vlieger, Nov 12 2015 *)
  • PARI
    for(n=1,999,binomod(3*n,n,n)==0&&print1(n",")) \\ Using binomod.gp by M. Alekseyev, cf. links.
    
  • Python
    from _future_ import division
    A260640_list, b = [], 3
    for n in range(1,10**3):
        if not b % n:
            A260640_list.append(n)
        b = b*3*(3*n+2)*(3*n+1)//((2*n+2)*(2*n+1)) # Chai Wah Wu, Jan 27 2016
    
Showing 1-4 of 4 results.