[go: up one dir, main page]

login
a(n) = (floor(2*n/3))! mod (2n-1).
1

%I #24 Aug 21 2024 15:44:04

%S 0,1,2,2,6,2,11,0,6,17,0,1,20,0,1,2,0,0,7,0,15,40,0,41,0,0,20,0,0,26,

%T 47,0,0,47,0,18,33,0,0,42,0,75,0,0,31,0,0,0,21,0,94,9,0,56,65,0,95,0,

%U 0,0,0,0,0,99,0,57,0,0,32,121,0,0,0,0,148,64,0,0,49

%N a(n) = (floor(2*n/3))! mod (2n-1).

%C if a(n) > 0 then 2n-1, except n=5 and n=13, is prime.

%H Robert Israel, <a href="/A283362/b283362.txt">Table of n, a(n) for n = 1..10000</a>

%p f:= proc(n)

%p local m,r,p,k;

%p m:= floor(2*n/3);

%p r:= 2*n-1;

%p p:= 1;

%p for k from 1 to m do

%p p:= p*k mod r;

%p if p = 0 then break fi;

%p od:

%p p

%p end proc:

%p f(1):= 0:

%p map(f, [$1..100]); # _Robert Israel_, Mar 08 2017

%t Table[Mod[Floor[(2n)/3]!,2n-1],{n,80}] (* _Harvey P. Dale_, Aug 21 2024 *)

%o (PARI) a(n) = (2*n\3)! % (2*n-1); \\ _Michel Marcus_, Mar 07 2017

%K nonn

%O 1,3

%A _Zhandos Mambetaliyev_, Mar 06 2017

%E More terms from _Michel Marcus_, Mar 07 2017