cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A139221 Numbers k such that both 41+(k+k^2)/2 and 41+(k+k^2) are primes.

This page as a plain text file.
%I A139221 #15 May 21 2024 11:59:27
%S A139221 0,3,11,20,23,27,32,39,48,51,59,60,83,108,111,116,128,132,135,171,188,
%T A139221 203,212,227,240,263,275,315,324,356,359,363,384,392,447,476,479,515,
%U A139221 528,588,627,647,648,672,731,759,780,804,839,864,875,900,903,968,975
%N A139221 Numbers k such that both 41+(k+k^2)/2 and 41+(k+k^2) are primes.
%C A139221 Intersection of A139220 and A056561.
%H A139221 Daniel Starodubtsev, <a href="/A139221/b139221.txt">Table of n, a(n) for n = 1..10000</a>
%e A139221 If k = 11 then 41 + (k + k^2) / 2 = 107 (prime) and 41 + (k + k^2) = 173 (prime).
%t A139221 Select[Table[Range[0,2000]],PrimeQ[41+(#+#^2)/2]&&PrimeQ[41+#+#^2]&]
%t A139221 Select[Range[0,1000],AllTrue[41+{(#+#^2)/2,#+#^2},PrimeQ]&] (* _Harvey P. Dale_, May 21 2024 *)
%o A139221 (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
%o A139221 (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
%o A139221 (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
%Y A139221 Cf. A000217, A056561, A139219, A139220.
%K A139221 nonn
%O A139221 1,2
%A A139221 _Zak Seidov_, Apr 11 2008