OFFSET
1,2
COMMENTS
The formula was discovered by Andrew T. Gazsi in 1961.
The polynomial can also be given as 30*(2*k - 27)*(k - 15). Its value is negative (-30) at k = 14 and 0 and k = 15.
Beiler erroneously claimed that the polynomial generates twin primes for k = 1 to 20.
REFERENCES
Albert H. Beiler, Recreations in the Theory of Numbers: The Queen of Mathematics Entertains, 2nd ed., Dover Publications, Inc., New York, 1966, p. 225.
Joseph B. Dence and Thomas P. Dence, Elements of the Theory of Numbers, Academic Press, 1999, problem 1.94, p.35.
Andrew T. Gazsi, A Formula to Generate Prime Pairs, Recreational Mathematics Magazine, edited by Joseph S. Madachy, Issue 6, December 1961, p. 44.
LINKS
Giovanni Resta, Table of n, a(n) for n = 1..10000
James Alston Hope Hunter and Joseph S. Madachy, Mathematical Diversions, D. van Nostrand Company, Inc., Princeton, New Jersey, 1963, p. 7.
Carlos Rivera, Problem 44. Twin-primes producing polynomials race, The Prime Puzzles & Problems Connection.
EXAMPLE
1 is in the sequence since 60*1^2 - 1710*1 + 12150 = 10500 and (10499, 10501) are twin primes.
MAPLE
filter:= proc(n) local k;
k:= abs(60*n^2-1710*n+12150);
isprime(k+1) and isprime(k-1)
end proc:
select(filter, [$1..300]); # Robert Israel, Jun 19 2018
MATHEMATICA
f[n_] := 60n^2 - 1710n + 12150; aQ[n_]:=PrimeQ[f[n]-1] && PrimeQ[f[n]+1]; Select[Range[225], aQ]
PROG
(PARI) f(n) = abs(60*n^2 - 1710*n + 12150);
isok(n) = my(fn=f(n)); isprime(fn-1) && isprime(fn+1); \\ Michel Marcus, Apr 27 2018
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amiram Eldar, Apr 26 2018
STATUS
approved