A051169 Smallest number m such that 2*m - p is composite for the first n primes p.
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
Offset: 1
Examples
a(2) = 6 because 2*6-2 = 10 and 2*6-3 = 9 are composite.
References
- Computed by Peter G. Anderson at the Rochester Institute of Technology.
Links
- Paul S. Bruckman and T. D. Noe, Table of n, a(n) for n = 1..974
Programs
-
Haskell
a051169 n = head [m | m <- [2..], all (== 0) $ map (a010051' . (2*m -)) $ take n a000040_list] -- Reinhard Zumkeller, Apr 09 2015
-
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 *)
Extensions
More terms from Paul S. Bruckman, Jan 20 2007
Edited by N. J. A. Sloane, Apr 14 2007, May 04 2007, Jun 10 2008