login
A283361
a(n) = (Product_{k=2..floor(2*n/3)} k^2) mod (2n-1).
1
0, 0, 1, 4, 4, 0, 4, 4, 0, 2, 4, 0, 1, 0, 0, 1, 4, 0, 0, 12, 0, 20, 9, 0, 36, 0, 0, 29, 0, 0, 27, 13, 0, 0, 65, 0, 40, 67, 0, 0, 26, 0, 64, 0, 0, 71, 0, 0, 0, 53, 0, 49, 81, 0, 33, 83, 0, 98, 0, 0, 0, 0
OFFSET
0,4
COMMENTS
If a(n) > 0 then 2n - 1 is prime. Proof: If 2n-1 is composite number, then the greatest prime factor (Gpf) of 2n-1 be 3 <= Gpf(2n-1) <= floor(2*n/3) and a(n)=Product_{k=2..floor(2*n/3)} (k^2 (mod 2n-1)) = 0. Else Gpf(2n-1) = 2n-1. a(n)>0 2n-1 is prime number. - Zhandos Mambetaliyev, Mar 06 2017
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
MATHEMATICA
Table[PowerMod[Product[k, {k, 2, Floor[2 n/3]}], 2, 2 n - 1], {n, 0, 61}] (* Michael De Vlieger, Mar 06 2017 *)
PROG
(PARI) a(n)=prod(k=2, 2*n\3, k^2)%(2*n-1) \\ Charles R Greathouse IV, Mar 06 2017
(PARI) a(n)=lift(Mod((2*n\3)!, 2*n-1)^2) \\ Charles R Greathouse IV, Mar 06 2017
CROSSREFS
Cf. A004523 (Two even followed by one odd).
Sequence in context: A158100 A104287 A174611 * A138518 A290799 A155836
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
More terms from Charles R Greathouse IV, Mar 06 2017
STATUS
approved