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.
%I A216930 #24 Dec 25 2022 05:34:12 %S A216930 1,909,11925,358875,959595,1047585,3673089,3925635,3973971,4995825, %T A216930 5519241,6516015,6832245,7217805,7422381,9145809,10929765,11038071, %U A216930 11477235,11721291,12015555,12262791,12280935,13454349,13508475,14625849,15320829,15321489,15332745 %N A216930 Numbers k such that k + 2, k^2 + 2, k^3 + 2, k^4 + 2 and k^5 + 2 are all prime. %C A216930 k^6 + 2 is also prime for k = 4995825, 11038071, ... %C A216930 a(2) = 909 = A245510(6); a(10) = 4996825, the first k such that k^6 + 2 is also prime, is A245510(7). - _Jon E. Schoenfield_, Dec 24 2022 %F A216930 a(n) == 3 (mod 6) for n>1. - _Alexandru Petrescu_, Dec 24 2022 %t A216930 Select[Range[16000000], And@@PrimeQ/@(Table[n^i+2, {i, 1, 5}]/.n->#)&] %t A216930 Select[Range[16*10^6], AllTrue[2 + #^Range[5], PrimeQ] &] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Jun 24 2015 *) %o A216930 (Python) %o A216930 from sympy import isprime %o A216930 def ok(n): return all(isprime(n**i+2) for i in range(1, 6)) %o A216930 print([k for k in range(1, 2*10**7, 2) if ok(k)]) # _Michael S. Branicky_, Dec 24 2022 %Y A216930 Cf. A245510. %Y A216930 Intersection of A040976, A067201, A067200, A216974, and A216976. %K A216930 nonn %O A216930 1,2 %A A216930 _Michel Lagneau_, Sep 20 2012