A092749 a(n) is the least k such that m^2 + m + k is prime for m = 0..n.
2, 3, 5, 5, 11, 11, 11, 11, 11, 11, 17, 17, 17, 17, 17, 17, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41, 41
Offset: 0
Examples
a(1) = 3 because 0^2 + 0 + 3 = 3 is prime and 1^2 + 1 + 3 = 5 is prime and it is the smallest number with the required properties. a(2) = 5 because 5, 7, and 11 are primes; a(3) = 5 because 5, 7, 11, and 17 are primes; a(4) = 11 because 11, 13, 17, 23, and 31 are prime. - _Robert G. Wilson v_, Sep 30 2013
References
- Underwood Dudley, Mathematical Cranks, MAA: Washington, DC, 1992. See pp. 62f.
- R. F. Lukes, C. D. Patterson, and H. C. Williams, Numerical sieving devices: their history and some applications, Nieuw Archief Wisk. 13 (1995), pp. 113-139.
Links
- R. A. Mollin, Prime-producing quadratics, Amer. Math. Monthly 104 (1997), 529-544.
Crossrefs
Cf. A014556.
Programs
-
Mathematica
allPrime[n_, k_] := And @@ PrimeQ[Table[m^2 + m + k, {m, 0, n}]]; Table[k = 0; While[! allPrime[n, k], k++]; k, {n, 0, 39}] (* T. D. Noe, Mar 05 2012 *) f[n_] := Block[{p = FoldList[#1 + #2 &, 1, 2 Range@ n]}, While[ Union[ PrimeQ@ p][[1]] == False, p = p + 2]; p[[1]]]; f[0] = 2; Array[f, 40, 0] (* Robert G. Wilson v, Sep 30 2013 *)
-
PARI
isok(k,n) = {for (m=0, n, if (!isprime(m^2 + m + k), return(0));); return (1);} a(n) = {my(k = 0); while(!isok(k,n), k++); k;} \\ Michel Marcus, Oct 06 2017
Comments