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!)
A179760 Greatest k <= n such that 2^n+2^k+1 is prime, or 0 if no such k exists. 3

%I #31 Mar 31 2012 13:22:06

%S 1,1,3,1,3,5,7,0,8,7,6,5,12,11,15,1,15,13,18,17,12,7,18,9,0,21,25,21,

%T 18,25,30,0,28,27,29,33,36,23,30,0,39,41,0,17,42,43,35,0,30,29,41,21,

%U 47,45,51,0,55,0,47,41,51,21,23,0,47,63,66,65,58

%N Greatest k <= n such that 2^n+2^k+1 is prime, or 0 if no such k exists.

%C Up to n=6601, a(n) = 0 for 916 values of n and a(n) >= n/2 for 4574 values of n.

%H Pierre CAMI, <a href="/A179760/b179760.txt">Table of n, a(n) for n = 1..10000</a>

%t Table[k=n; While[k>0 && ! PrimeQ[2^n+2^k+1], k--]; k, {n, 100}]

%o (PARI) A179760(n)={forstep(i=n,1,-1, if(isprime(2^n+2^i+1),return(i)));return(0)}

%Y Cf. A106821, A178993, A179291, A179013.

%K nonn

%O 1,3

%A _Pierre CAMI_, Jan 12 2011

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 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)