|
|
A006285
|
|
Odd numbers not of form p + 2^x (de Polignac numbers).
(Formerly M5390)
|
|
29
|
|
|
1, 127, 149, 251, 331, 337, 373, 509, 599, 701, 757, 809, 877, 905, 907, 959, 977, 997, 1019, 1087, 1199, 1207, 1211, 1243, 1259, 1271, 1477, 1529, 1541, 1549, 1589, 1597, 1619, 1649, 1657, 1719, 1759, 1777, 1783, 1807, 1829, 1859, 1867, 1927, 1969, 1973
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Contains both primes (A065381) and composites (A098237). - Jonathan Vos Post, Jun 19 2008
A109925(a(n)) = 0. - Reinhard Zumkeller, May 27 2015
Crocker shows that this sequence is infinite; in particular, 2^2^n - 5 is in this sequence for each n > 2. - Charles R Greathouse IV, Sep 01 2015
|
|
REFERENCES
|
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
Clifford A. Pickover, A Passion for Mathematics, John Wiley & Sons, Inc., NJ, 2005, pp. 62 & 300.
D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, see #127.
|
|
LINKS
|
T. D. Noe, Table of n, a(n) for n = 1..10000
Roger Crocker, A theorem concerning prime numbers, Mathematics Magazine 34:6 (1961), pp. 316+344.
P. Pollack, Not Always Buried Deep, Selections from Analytic and Combinatorial Number Theory, ex. 5.1.6, p. 193, and p. 216 ff.
|
|
EXAMPLE
|
127 is in the sequence since 127 - 2^0 = 126, 127 - 2^1 = 125, 127 - 2^2 = 123, 127 - 2^3 = 119, 127 - 2^4 = 111, 127 - 2^5 = 95, and 127 - 2^6 = 63 are all composite. - Michael B. Porter, Aug 29 2016
|
|
MAPLE
|
N:= 10000: # to get all terms <= N
P:= select(isprime, {2, seq(i, i=3..N, 2)}):
T:= {seq(2^i, i=0..ilog2(N))}:
R:= {seq(i, i=1..N, 2)} minus {seq(seq(p+t, p=P), t=T)}:
sort(convert(R, list)); # Robert Israel, Sep 23 2016
|
|
MATHEMATICA
|
Do[ i = 0; l = Ceiling[ N[ Log[ 2, n ] ] ]; While[ ! PrimeQ[ n - 2^i ] && i < l, i++ ]; If[ i == l, Print[ n ] ], {n, 1, 2000, 2} ]
Join[{1}, Select[Range[5, 1999, 2], !MemberQ[PrimeQ[#-2^Range[Floor[ Log[ 2, #]]]], True]&]] (* Harvey P. Dale, Jul 22 2011 *)
|
|
PROG
|
(PARI) isA006285(n, i=1)={ bittest(n, 0) && until( isprime(n-i) || n<i<<=1, ); i>n } \\ - M. F. Hasler, Jun 19 2008, updated Apr 12 2017
(Haskell)
a006285 n = a006285_list !! (n-1)
a006285_list = filter ((== 0) . a109925) [1, 3 ..]
-- Reinhard Zumkeller, May 27 2015
(MAGMA) lst:=[]; for n in [1..1973 by 2] do x:=-1; repeat x+:=1; a:=n-2^x; until a lt 1 or IsPrime(a); if a lt 1 then Append(~lst, n); end if; end for; lst; // Arkadiusz Wesolowski, Aug 29 2016
|
|
CROSSREFS
|
Cf. A133122, A098237, A065381, A156695, A109925, A118954, A232460, A276417.
Sequence in context: A334095 A164966 A178088 * A094933 A156702 A180536
Adjacent sequences: A006282 A006283 A006284 * A006286 A006287 A006288
|
|
KEYWORD
|
nonn,nice,easy
|
|
AUTHOR
|
N. J. A. Sloane.
|
|
EXTENSIONS
|
More terms from Larry Reeves (larryr(AT)acm.org), Apr 13 2000
Link to Pollack Notes corrected by Rainer Rosenthal, Feb 03 2009, and M. F. Hasler, Apr 12 2017
|
|
STATUS
|
approved
|
|
|
|