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.

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