login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A208281 Numbers n such that 3*prime(n)*2^k - 1 is prime for some k > 0 and then 3*prime(n)*2^k + 1 is also prime. 1

%I #16 Aug 03 2014 14:01:39

%S 1,2,3,4,6,7,9,15,24,27,28,33,34,35,58,60,61,65,67,68,69,74,78,81,86,

%T 91,92,96,105,106,108,110,119,121,125,128,129,133,134,135,137,138,146,

%U 155,172,173,174,177,179,187,199,215,216,224

%N Numbers n such that 3*prime(n)*2^k - 1 is prime for some k > 0 and then 3*prime(n)*2^k + 1 is also prime.

%C Note that only first k for which 3*prime(n)*2^k - 1 is prime is used to test whether 3*prime(n)*2^k + 1 is prime.

%H Pierre CAMI, <a href="/A208281/b208281.txt">Table of n, a(n) for n = 1..6836</a>

%e 3*prime(1)*2^1-1=11 prime,13 prime so a(1)=1

%e 3*prime(2)*2^1-1=17 prime,19 prime so a(2)=2

%e 3*prime(3)*2^1-1=29 prime,31 prime so a(3)=3

%e 3*prime(4)*2^1-1=41 prime,43 prime so a(4)=4

%e 3*prime(5)*2^1-1=65 composite

%e 3*prime(5)*2^2-1=131 prime,133 composite

%e 3*prime(6)*2^1-1=77 composite

%e 3*prime(6)*2^2-1=155 composite

%e 3*prime(6)*2^3-1=311 prime,313 prime so a(5)=6

%t t = {}; Do[p = Prime[n]; k = 1; While[! PrimeQ[3*p*2^k - 1], k++]; If[PrimeQ[3*p*2^k + 1], AppendTo[t, n]], {n, 224}]; t (* _T. D. Noe_, Feb 29 2012 *)

%o PFGW64 from Primeform group and SCRIPTIFY

%o Command pfgw64 -f in.txt

%o in.txt file :

%o SCRIPT

%o DIM nn,0

%o DIM kk

%o DIMS tt

%o OPENFILEOUT myfile,k.txt

%o LABEL loopn

%o SET nn,nn+1

%o IF nn>50000 THEN END

%o SET kk,0

%o LABEL loopk

%o SET kk,kk+1

%o SETS tt,%d,%d\,;nn;kk

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

%o IF ISPRP THEN GOTO a

%o IF ISPRIME THEN GOTO a

%o GOTO loopk

%o LABEL a

%o PRP 3*p(nn)*2^kk+1,tt

%o IF ISPRP THEN GOTO b

%o IF ISPRIME THEN GOTO b

%o GOTO loopn

%o LABEL b

%o WRITE myfile,tt

%o GOTO loopn

%Y Cf. A207572.

%K nonn

%O 1,2

%A _Pierre CAMI_, Feb 25 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 18 22:18 EDT 2024. Contains 371782 sequences. (Running on oeis4.)