OFFSET
1,1
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
LINKS
Robert Israel, Table of n, a(n) for n = 1..1000
EXAMPLE
Binomial(3*34,34) == 3^6 (mod 34), so 34 is a member.
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 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Ryan Propper, Aug 05 2005
EXTENSIONS
Corrected and extended by Max Alekseyev, Sep 13 2009
Edited by Max Alekseyev, Sep 20 2009
STATUS
approved