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 A384187 #12 Jun 13 2025 15:34:59
%S A384187 1361,70216961,71317991,311153281,371383381,385230821,400675721,
%T A384187 466490881,487757861,620258761,818694271,822486341,888942491,
%U A384187 898259491,1102784471,1423261241,1443957371,1623698051,1628827091,1729743571,1831375171,1837091231,1904579381,1978478521,2070333781
%N A384187 Primes p such that p + 6, p^2 + 6, p^3 + 6, p^4 + 6 and p^5 + 6 are primes.
%C A384187 This is a subsequence of A023201: primes p such that p + 6 is also prime (sexy primes).
%C A384187 The largest tuple of primes of the form (p, p + m, p^2 + m, p^3 + m,..., p^k + m), where m is a digit from 1 to 9, is the 6-tuple (p, p + 6, p^2 + 6, p^3 + 6, p^4 + 6, p^5 + 6). Indeed, if m is an odd digit, then p must be 2 and the longest tuple is (2, 2+3, 2^2+3, 2^3+3, 2^4+3).
%C A384187 For p > 2 we consider the cases:
%C A384187 If m = 2, it is satisfied that p^2 + 2 == 0 (mod 3) for all p!= 3. In fact, (p, p + 2, p^2 + 2) are prime only if p = 3.
%C A384187 If m = 4, then p^4 + 4 == 0 (mod 5), for all p!= 5. Then the longest tuple is (p, p + 4, p^2 + 4, p^3 + 4), which are the p primes of A243734
%C A384187 If m = 6, then p^6 + 6 == 0 (mod 7), for all p!= 7. Thus, the largest tuple is (p, p + 6, p^2 + 6, p^3 + 6, p^4 + 6, p^5 + 6), where a(n) gives these primes.
%C A384187 If m = 8, then p^2 + 8 == 0 (mod 3) for all p!=3. In fact, (p, p + 8, p^2 + 8) are prime only if p = 3.
%t A384187 Select[Prime[Range[32327000]],AllTrue[#^Range[0,5]+6,PrimeQ]&] (* The program generates the first 10 terms of the sequence. *) (* _Harvey P. Dale_, Jun 13 2025 *)
%o A384187 (Python)
%o A384187 from sympy import isprime, primerange
%o A384187 lim = 10**9
%o A384187 A384187 = []
%o A384187 for p in primerange(2, lim):
%o A384187 if isprime(p + 6) and isprime(p**2 + 6) and isprime(p**3 + 6) and isprime(p**4 + 6) and isprime(p**5 + 6):
%o A384187 A384187.append(p)
%o A384187 print(", ".join(str(p) for p in A384187))
%Y A384187 Cf. A023201, A243734.
%K A384187 nonn
%O A384187 1,1
%A A384187 _Gonzalo MartÃnez_, May 21 2025