|
|
A051169
|
|
Smallest number m such that 2*m - p is composite for the first n primes p.
|
|
3
|
|
|
3, 6, 15, 49, 49, 49, 49, 110, 154, 154, 278, 278, 278, 278, 496, 496, 496, 496, 496, 496, 1321, 1321, 1321, 1321, 1321, 1321, 2686, 2686, 2686, 2686, 2686, 2686, 2686, 3713, 3713, 3713, 3713, 3713, 3713, 21766, 21766, 21766, 21766, 21766, 21766, 21766
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
REFERENCES
|
Computed by Peter G. Anderson at the Rochester Institute of Technology.
|
|
LINKS
|
|
|
EXAMPLE
|
a(2) = 6 because 2*6-2 = 10 and 2*6-3 = 9 are composite.
|
|
MATHEMATICA
|
a[n_] := a[n] = Catch[For[m = 2, True, m++, If[And @@ (! PrimeQ[2*m - #] &) /@ Prime /@ Range[n], Throw[m]]]]; Table[ Print[a[n]]; a[n], {n, 1, 46}] (* Jean-François Alcover, Jul 17 2012 *)
Module[{nn=50, prs}, prs=Prime[Range[nn]]; Table[SelectFirst[Range[50000], AllTrue[Table[2#-p, {p, Take[prs, n]}], CompositeQ]&], {n, nn}]] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 18 2015 *)
|
|
PROG
|
(Haskell)
a051169 n = head [m | m <- [2..],
all (== 0) $ map (a010051' . (2*m -)) $ take n a000040_list]
|
|
CROSSREFS
|
|
|
KEYWORD
|
nice,nonn
|
|
AUTHOR
|
Paul S. Bruckman (pbruckman(AT)hotmail.com)
|
|
EXTENSIONS
|
More terms from Paul S. Bruckman, Jan 20 2007
|
|
STATUS
|
approved
|
|
|
|