[go: up one dir, main page]

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
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, 91, 92, 96, 105, 106, 108, 110, 119, 121, 125, 128, 129, 133, 134, 135, 137, 138, 146, 155, 172, 173, 174, 177, 179, 187, 199, 215, 216, 224 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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.
LINKS
EXAMPLE
3*prime(1)*2^1-1=11 prime,13 prime so a(1)=1
3*prime(2)*2^1-1=17 prime,19 prime so a(2)=2
3*prime(3)*2^1-1=29 prime,31 prime so a(3)=3
3*prime(4)*2^1-1=41 prime,43 prime so a(4)=4
3*prime(5)*2^1-1=65 composite
3*prime(5)*2^2-1=131 prime,133 composite
3*prime(6)*2^1-1=77 composite
3*prime(6)*2^2-1=155 composite
3*prime(6)*2^3-1=311 prime,313 prime so a(5)=6
MATHEMATICA
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 *)
PROG
PFGW64 from Primeform group and SCRIPTIFY
Command pfgw64 -f in.txt
in.txt file :
SCRIPT
DIM nn, 0
DIM kk
DIMS tt
OPENFILEOUT myfile, k.txt
LABEL loopn
SET nn, nn+1
IF nn>50000 THEN END
SET kk, 0
LABEL loopk
SET kk, kk+1
SETS tt, %d, %d\,; nn; kk
PRP 3*p(nn)*2^kk-1, tt
IF ISPRP THEN GOTO a
IF ISPRIME THEN GOTO a
GOTO loopk
LABEL a
PRP 3*p(nn)*2^kk+1, tt
IF ISPRP THEN GOTO b
IF ISPRIME THEN GOTO b
GOTO loopn
LABEL b
WRITE myfile, tt
GOTO loopn
CROSSREFS
Cf. A207572.
Sequence in context: A064414 A224482 A002475 * A306074 A250252 A246274
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 25 2012
STATUS
approved

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 August 29 11:15 EDT 2024. Contains 375512 sequences. (Running on oeis4.)