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

%I #24 Mar 02 2019 03:00:36

%S 3,5,3,5,9,5,9,11,45,23,35,15,3,9,27,51,27,53,9,39,23,249,51,51,131,

%T 221,29,105,321,179,5,221,111,411,191,65,83,75,95,101,147,83,149,111,

%U 203,131,9,245,281,15,83,65,299

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

%C For n < 1275, the ratio a(n)/prime(n) is always < 6 and on average ~0.7.

%C From _Robert G. Wilson v_, Jan 27 2015: (Start)

%C Records: 3, 5, 9, 11, 45, 51, 53, 249, 321, 411, 611, 1383, 1875, 2423, 4239, 4623, 6549, 7095, 8091, 9003, 10065, 10719, 18005, 18545, 19251, 21111, 25409, 39741, 49709, 54455, ..., .

%C a(n)=3 for n = 1, 3, 13, 71, ...;

%C a(n)=5 for n = 2, 4, 6, 31, 466, ...;

%C a(n)=9 for n = 5, 7, 14, 19, 47, 342, 1167, ...;

%C a(n)=11 for n = 8, ...; etc.

%C (End)

%H Robert G. Wilson v, <a href="/A253398/b253398.txt">Table of n, a(n) for n = 1..1500</a> (first 1275 terms from Pierre CAMI)

%F a(n) = A247479(p_n). - _Robert G. Wilson v_, Jan 27 2015

%e 3*2^2 + 1 = 13 (prime), so a(1)=3.

%e 3*2^3 + 1 = 25 (composite), 5*2^3 + 1 = 41 (prime), so a(2)=5.

%e 3*2^5 + 1 = 97 (prime), so a(3)=3.

%t f[n_] := Block[{k = 3, p = 2^Prime@ n}, While[ !PrimeQ[ k*p + 1], k += 2]; k]; Array[f, 53] (* _Robert G. Wilson v_, Jan 25 2015 *)

%o (PFGW & SCRIPT)

%o SCRIPT

%o DIM i,0

%o DIM j

%o OPENFILEOUT myf,a(n).txt

%o LABEL loop1

%o SET i,i+1

%o SET j,1

%o LABEL loop2

%o SET j,j+2

%o PRP j*2^p(i)+1

%o IF ISPRP THEN WRITE myf,k

%o IF ISPRP THEN GOTO loop1

%o GOTO loop2

%o (PARI) a(n)=k=1;while(!isprime((2*k+1)*2^prime(n)+1),k++);2*k+1

%o vector(100,n,a(n)) \\ _Derek Orr_, Dec 31 2014

%Y Cf. A247479, A253027.

%K nonn

%O 1,1

%A _Pierre CAMI_, Dec 31 2014

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 July 31 07:33 EDT 2024. Contains 374774 sequences. (Running on oeis4.)