Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Aug 28 2021 06:42:21
%S 2,18,72,780,228,852,228,1080,4020,25800,6012,40332,713502,332880,
%T 455892,6428118,4142652,173808
%N a(n) is the least k such that k*Mersenne_prime(n)^2 - 1 and k*Mersenne_prime(n)^2 + 1 are twin primes.
%e 2*((2^2-1)^2) - 1 = 17, 2*((2^2-1)^2) + 1 = 19; 17 and 19 are twin primes so a(1) = 2.
%t f[p_] := Module[{k = 1}, While[!PrimeQ[k*p^2 - 1] || !PrimeQ[k*p^2 + 1], k++]; k]; f /@ (2^MersennePrimeExponent[Range[10]] - 1) (* _Amiram Eldar_, Aug 28 2021 *)
%Y Cf. A000043, A000668, A001097.
%K nonn,more
%O 1,1
%A _Pierre CAMI_, Oct 08 2004
%E a(7) corrected, a(12) inserted and a(15)-a(18) added by _Amiram Eldar_, Aug 28 2021