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!)
A207572 Least number k > 0 such that 3*prime(n)*2^k-1 is a prime number. 2
1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 3, 2, 2, 1, 1, 1, 1, 4, 1, 4, 7, 2, 8, 4, 2, 3, 1, 1, 1, 1, 1, 2, 1, 2, 2, 2, 1, 1, 2, 5, 5, 15, 3, 11, 1, 1, 2, 3, 1, 1, 3, 1, 3, 2, 2, 3, 1, 2, 2, 2, 1, 8, 6, 10, 1, 1, 4, 3, 1, 5, 4, 1, 3, 1, 1, 1, 1, 1, 3, 12, 6, 2, 2, 3, 1, 1 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,5
LINKS
EXAMPLE
3*2*2^1-1 = 11 prime so a(1)=1.
3*3*2^1-1 = 17 prime so a(2)=1.
3*5*2^1-1 = 29 prime so a(3)=1.
3*7*2^1-1 = 41 prime so a(4)=1.
3*11*2^1-1 = 65 composite.
3*11*2^2-1 = 131 prime so a(5)=2.
MATHEMATICA
Table[p = Prime[n]; k = 1; While[! PrimeQ[3*p*2^k - 1], k++]; k, {n, 100}] (* 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
WRITE myfile, tt
GOTO loopn
CROSSREFS
Sequence in context: A347380 A308638 A356320 * A289623 A086195 A086197
KEYWORD
nonn
AUTHOR
Pierre CAMI, Feb 20 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 April 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)