The OEIS is supported by the many generous donors to the OEIS Foundation.


(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256787 Smallest odd number k such that k*2^(2*n+1)+1 is a prime number. 4


%S 1,5,3,5,15,9,5,5,9,11,11,45,5,15,23,35,9,59,15,5,3,9,35,27,23,17,51,

%T 5,29,27,53,9,9,9,23,39,23,5,29,249,9,51,5,75,51,117,29,77,131,219,

%U 221,29,53,105,321,95,179,197,101,51,81,101,11,5,21,221,53

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

%C As N increases, (Sum_{n=1..N} a(n))/(Sum_{n=1..N} n) appears to tend to log(2), as can be seen by plotting the first 10000 terms.

%C This observation is consistent with the prime number theorem as the probability that k*2^n+1 is prime is 1/(n*log(2)+log(k)) so ~ 1/(n*log(2)) as n increases, if k ~ n*log(2) then k/(n*log(2)) ~ 1.

%H Pierre CAMI, <a href="/A256787/b256787.txt">Table of n, a(n) for n = 0..10000</a>

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

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

%p for n from 0 to 100 do

%p R:= 2^(2*n+1);

%p for k from 1 by 2 do

%p if isprime(k*R+1) then A[n]:= k; break fi

%p od:

%p od:

%p seq(A[n],n=0..100); # _Robert Israel_, Apr 24 2015

%t f[n_] := Block[{g, i, k}, g[x_, y_] := y*2^(2*x + 1) + 1; Reap@ For[i = 0, i <= n, i++, k = 1; While[Nand[PrimeQ[g[i, k]] == True, OddQ@ k], k++]; Sow@ k] // Flatten // Rest]; f@ 66 (* _Michael De Vlieger_, Apr 18 2015 *)



%o DIM i

%o DIM n,-1

%o DIMS t

%o OPENFILEOUT myf,a(n).txt

%o LABEL loop1

%o SET n,n+2

%o SET i,-1

%o LABEL loop2

%o SET i,i+2

%o SETS t,%d,%d\,;n;i

%o PRP i*2^n+1,t


%o GOTO loop2

%o LABEL a

%o WRITE myf,t

%o GOTO loop1

%o (PARI) vector(100, n, n--; k=1; while(!isprime(k*2^(2*n+1)+1), k+=2); k) \\ _Colin Barker_, Apr 10 2015

%K nonn

%O 0,2

%A _Pierre CAMI_, Apr 10 2015

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 May 28 07:06 EDT 2022. Contains 354112 sequences. (Running on oeis4.)