login
A103557
Least k such that k*((prime(n)#)^2)-1 and k*((prime(n)#)^2)+1 are twin primes.
1
1, 2, 7, 6, 6, 104, 152, 116, 181, 6, 78, 89, 85, 262, 133, 57, 77, 35, 237, 140, 315, 397, 663, 48, 1135, 382, 318, 261, 542, 352, 120, 31, 1430, 553, 43, 913, 1235, 122, 1008, 602, 222, 1562, 255, 6293, 1231, 2507, 1029, 1413, 5986, 3860, 45, 2622, 3033, 457
OFFSET
1,2
EXAMPLE
1*((2*3)^2)-1 = 35 is composite, 2*((2*3)^2)-1 = 71 is prime, 2*((2*3)^2)+1 = 73 is prime twin of 71 so a(2) = 2.
MATHEMATICA
a[n_] := Module[{k = 1, p = Product[Prime[i], {i, 1, n}]}, While[!(PrimeQ[k*p^2-1] && NextPrime[k*p^2-1] == k*p^2+1), k++]; k]; Array[a, 50] (* Amiram Eldar, Jul 17 2021 *)
CROSSREFS
Sequence in context: A127817 A199173 A047232 * A210963 A210965 A189959
KEYWORD
nonn
AUTHOR
Pierre CAMI, Mar 23 2005
EXTENSIONS
More terms from Amiram Eldar, Jul 17 2021
STATUS
approved