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!)
A098929 Smallest k>0 such that (2^k)*A002110(n) + 1 is prime. 2

%I #11 Feb 07 2014 10:54:28

%S 1,1,1,1,1,2,3,11,2,4,1,2,3,15,23,6,11,1,7,6,7,10,1,9,28,1,3,7,63,1,

%T 25,29,13,3,25,12,9,18,20,15,66,3,5,39,10,37,15,14,31,6,9,27,12,7,15,

%U 12,6,11,41,35,116,15,7,28,6,9,23,28,23,2,2,9,5,17,27,56,69,132,29,1,20,17

%N Smallest k>0 such that (2^k)*A002110(n) + 1 is prime.

%H Pierre CAMI, <a href="/A098929/b098929.txt">Table of n, a(n) for n = 1..1029</a>

%t f[n_] := Block[{k = 1, p = Product[Prime[i], {i, n}]}, While[ !PrimeQ[2^k*p + 1], k++ ]; k]; Table[ f[n], {n, 82}]

%o (PFGW & SCRIPT)

%o Command pfgw64 -f in.txt

%o in.txt = SCRIPT file

%o SCRIPT

%o DIM n,0

%o DIM i,0

%o DIM pp

%o DIMS t

%o OPENFILEOUT myf,a(n).txt

%o LABEL loop1

%o SET n,n+1

%o SET i,0

%o LABEL loop2

%o SET i,i+1

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

%o SET pp,(2^i)*p(n)#+1

%o PRP pp,t

%o IF ISPRP THEN GOTO a

%o GOTO loop2

%o LABEL a

%o WRITE myf,t

%o GOTO loop1

%Y Cf. A002110, A097099.

%K nonn

%O 1,6

%A _Pierre CAMI_ and _Robert G. Wilson v_, Sep 27 2004

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 March 28 10:31 EDT 2024. Contains 371240 sequences. (Running on oeis4.)