OFFSET
1,2
LINKS
Daniel Starodubtsev, Table of n, a(n) for n = 1..10000
EXAMPLE
If k = 11 then 41 + (k + k^2) / 2 = 107 (prime) and 41 + (k + k^2) = 173 (prime).
MATHEMATICA
Select[Table[Range[0, 2000]], PrimeQ[41+(#+#^2)/2]&&PrimeQ[41+#+#^2]&]
Select[Range[0, 1000], AllTrue[41+{(#+#^2)/2, #+#^2}, PrimeQ]&] (* Harvey P. Dale, May 21 2024 *)
PROG
(Magma) [k:k in [0..1000]| IsPrime(41+(k+k^2) div 2) and IsPrime(41+k+k^2)]; // Marius A. Burtea, Feb 12 2020
(PARI) for(n=0, 1000, if(isprime(binomial(n+1, 2) +41) && isprime(n^2+n+41), print1(n", "))) \\ G. C. Greubel, Feb 12 2020
(Sage) [n for n in (0..1000) if is_prime(binomial(n+1, 2)+41) and is_prime(n^2+n+41)] # G. C. Greubel, Feb 12 2020
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Apr 11 2008
STATUS
approved