login
Least odd prime p such that p#*2^n-1 is prime, with p# the primorial A034386(p).
3

%I #24 Mar 13 2014 00:56:01

%S 3,3,3,3,5,3,3,7,7,5,3,109,17,5,13,17,5,3,17,67,11,89,13,17,7,89,31,

%T 29,19,37,5,7,29,3,79,43,41,3,11,53,5,13,3,29,11,137,179,227,11,11,97,

%U 59,53,11,3,83,17,47,19,19,29,73,41,3,7,11,79,71,13,41,257,19,5,151,79,3,31,19,79,5,281,5,37,263,139,17,23,127,223,151,149,131,113,3,47,41,59,31,23,89

%N Least odd prime p such that p#*2^n-1 is prime, with p# the primorial A034386(p).

%H Pierre CAMI, <a href="/A176994/b176994.txt">Table of n, a(n) for n = 0..2642</a>

%t Table[p=3; prod=6; While[! PrimeQ[prod*2^n-1], p=NextPrime[p]; prod=prod*p]; p, {n, 0, 100}]

%o PFGW SCRIPTIFY PROGRAM

%o Prime P in pfgw.log file

%o command : pfgw -f in.txt

%o in.txt file follows

%o SCRIPT

%o DIM nn,-1

%o DIM kk

%o DIMS tt

%o LABEL loopn

%o SET nn,nn+1

%o SET kk,1

%o LABEL loopk

%o SET kk,kk+1

%o SETS tt,%d,%d\,;nn;p(kk)

%o PRP p(kk)#*2^nn-1,tt

%o IF !(ISPRP || ISPRIME) THEN GOTO loopk

%o GOTO loopn

%o (Sage) primorial = lambda n: prod(primes(n+1)) # includes n, if prime

%o A176994 = lambda n: next(p for p in Primes() if p > 2 and is_pseudoprime(primorial(p)*2**n-1)) # _D. S. McNeil_, Dec 09 2010

%Y Cf. A085427.

%K nonn

%O 0,1

%A _Pierre CAMI_, Dec 08 2010