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!)
A097099 Smallest k>0 such that (2^k)*A002110(n) - 1 is prime. 2
1, 1, 1, 1, 2, 6, 1, 1, 2, 3, 12, 1, 2, 22, 2, 4, 13, 12, 6, 1, 4, 1, 4, 9, 2, 9, 5, 6, 2, 1, 9, 17, 22, 7, 19, 73, 23, 12, 5, 27, 33, 64, 33, 5, 7, 41, 44, 35, 29, 3, 19, 6, 26, 5, 11, 9, 33, 34, 16, 63, 46, 8, 4, 24, 48, 32, 11, 29, 26, 6, 25, 17, 31, 6, 46, 33, 46, 17, 8, 61, 12, 23, 76 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,5

LINKS

Pierre CAMI, Table of n, a(n) for n = 1..1042

MATHEMATICA

f[n_] := Block[{k = 1, p = Product[Prime[i], {i, n}]}, While[ !PrimeQ[2^k*p - 1], k++ ]; k]; Table[ f[n], {n, 83}] (* Robert G. Wilson v, Sep 27 2004 *)

kp[n_]:=Module[{k=1}, While[!PrimeQ[2^k n-1], k++]; k]; With[{prmrls=Rest[ FoldList[Times, 1, Prime[Range[90]]]]}, kp/@prmrls] (* Harvey P. Dale, Feb 01 2012 *)

PROG

(PFGW & SCRIPT)

Command pfgw64 -f in.txt

in.txt file = SCRIPT file

SCRIPT

DIM n, 0

DIM i, 0

DIM pp

DIMS t

OPENFILEOUT myf, a(n).txt

LABEL loop1

SET n, n+1

SET i, 0

LABEL loop2

SET i, i+1

SETS t, %d, %d, %d\,; n; p(n); i

SET pp, (2^i)*p(n)#-1

PRP pp, t

IF ISPRP THEN GOTO a

GOTO loop2

LABEL a

WRITE myf, t

GOTO loop1

CROSSREFS

Cf. A002110, A098929.

Sequence in context: A244814 A090185 A059813 * A316622 A197111 A065529

Adjacent sequences:  A097096 A097097 A097098 * A097100 A097101 A097102

KEYWORD

nonn

AUTHOR

Pierre CAMI, Sep 15 2004

EXTENSIONS

More terms from Robert G. Wilson v, Sep 27 2004

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 12 00:34 EDT 2022. Contains 356067 sequences. (Running on oeis4.)