%I #41 Jul 24 2021 01:11:06
%S 1,2,3,4,5,6,7,8,9,10,11,12,13,14,16,17,18,19,20,27,33,34,35,36,38,41,
%T 50,56,57,64,66,69,75,81,85,86,90,93,98,103,106,119,121,133,136,141,
%U 143,146,150,181,182,189,195,202,207,208,212,215,218,219,225
%N Numbers k such that abs(60*k^2 - 1710*k + 12150) +- 1 are twin primes.
%C The formula was discovered by Andrew T. Gazsi in 1961.
%C 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.
%C Beiler erroneously claimed that the polynomial generates twin primes for k = 1 to 20.
%D Albert H. Beiler, Recreations in the Theory of Numbers: The Queen of Mathematics Entertains, 2nd ed., Dover Publications, Inc., New York, 1966, p. 225.
%D Joseph B. Dence and Thomas P. Dence, Elements of the Theory of Numbers, Academic Press, 1999, problem 1.94, p.35.
%D Andrew T. Gazsi, A Formula to Generate Prime Pairs, Recreational Mathematics Magazine, edited by Joseph S. Madachy, Issue 6, December 1961, p. 44.
%H Giovanni Resta, <a href="/A303550/b303550.txt">Table of n, a(n) for n = 1..10000</a>
%H James Alston Hope Hunter and Joseph S. Madachy, <a href="https://archive.org/stream/B-001-001-217#page/n21/mode/2up">Mathematical Diversions</a>, D. van Nostrand Company, Inc., Princeton, New Jersey, 1963, p. 7.
%H Carlos Rivera, <a href="http://www.primepuzzles.net/problems/prob_044.htm">Problem 44. Twin-primes producing polynomials race</a>, The Prime Puzzles & Problems Connection.
%e 1 is in the sequence since 60*1^2 - 1710*1 + 12150 = 10500 and (10499, 10501) are twin primes.
%p filter:= proc(n) local k;
%p k:= abs(60*n^2-1710*n+12150);
%p isprime(k+1) and isprime(k-1)
%p end proc:
%p select(filter, [$1..300]); # _Robert Israel_, Jun 19 2018
%t f[n_] := 60n^2 - 1710n + 12150; aQ[n_]:=PrimeQ[f[n]-1] && PrimeQ[f[n]+1]; Select[Range[225], aQ]
%o (PARI) f(n) = abs(60*n^2 - 1710*n + 12150);
%o isok(n) = my(fn=f(n)); isprime(fn-1) && isprime(fn+1); \\ _Michel Marcus_, Apr 27 2018
%Y Cf. A001097, A001359, A006512, A088485, A108897, A124518, A124519, A139404, A185660.
%K nonn,easy
%O 1,2
%A _Amiram Eldar_, Apr 26 2018