OFFSET
1,1
COMMENTS
Sequence is infinite. For example, Pollack shows that numbers which are 1260327937 mod 2863311360 are not of the form p + 2^k for any prime p and k >= 0, and there are infinitely many primes in this congruence class by Dirichlet's theorem. - Charles R Greathouse IV, Jul 20 2014
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
P. Pollack, Not Always Buried Deep: Selections from Analytic and Combinatorial Number Theory, p. 193, ex. 5.1.6, p. 216ff. [?Broken link]
P. Pollack, Not Always Buried Deep: Selections from Analytic and Combinatorial Number Theory, p. 193, ex. 5.1.6, p. 216ff.
Lei Zhou, Between 2^n and primes.
FORMULA
EXAMPLE
127 is a prime, 127-2^0 through 127-2^6 are all nonprimes.
MATHEMATICA
fQ[n_] := Block[{k = Floor[Log[2, n]], p = n}, While[k > -1 && ! PrimeQ[p - 2^k], k--]; If[k > 0, True, False]]; Drop[Select[Prime[Range[536]], ! fQ[#] &], {2}] (* Robert G. Wilson v, Feb 10 2005; corrected by Arkadiusz Wesolowski, May 05 2012 *)
PROG
(Haskell)
a065381 n = a065381_list !! (n-1)
a065381_list = filter f a000040_list where
f p = all ((== 0) . a010051 . (p -)) $ takeWhile (<= p) a000079_list
-- Reinhard Zumkeller, Nov 24 2011
(PARI) is(p)=my(k=1); while(k<p&&!isprime(p-k), k*=2); if(k>p, return(isprime(p))); 0 \\ Charles R Greathouse IV, Jul 20 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 03 2001
EXTENSIONS
Link and cross-reference fixed by Charles R Greathouse IV, Nov 09 2008
STATUS
approved