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 A321891 #38 Jan 31 2025 11:49:25 %S A321891 11,13,19,29,31,37,61,67,79,97,109,127,139,157,181,199,241,271,277, %T A321891 367,397,409,439,457,487,499,571,577,601,607,661,691,709,727,751,769, %U A321891 829,919,937,991,1021,1039,1069,1117,1171,1201,1231,1237,1291,1297,1327,1381 %N A321891 Prime numbers of the form p^3 + q, where p and q are primes. %C A321891 For reasons of parity, either p or q must be equal to 2, so this actually is the union of (mostly) "primes of the form p + 8" (A092402) and (rarely) "primes of the form p^3 + 2" (A048636 = 29, 127, 24391, 357913, ...). - _M. F. Hasler_, Jan 13 2025 %C A321891 Except for 13, these primes are the minimum or maximum prime numbers of the respective decade. - _Davide Rotondo_, Jan 31 2025 %H A321891 Robert Israel, <a href="/A321891/b321891.txt">Table of n, a(n) for n = 1..10000</a> %e A321891 37 is prime and 37 = 2^3 + 29, where 2 and 29 are primes, therefore 37 is a term. %p A321891 N:= 2000: # to get terms <= N %p A321891 A1:= select(t -> isprime(t) and isprime(t-8), {11,seq(i,i=13 ..N,6)}): %p A321891 v:= floor((N-2)^(1/3)): %p A321891 B:= select(t -> isprime(t) and isprime(t^3+2), {3,seq(i,i=5..v,6)}): %p A321891 sort(convert(A1 union map(t -> t^3+2,B), list)); # _Robert Israel_, Mar 05 2020 %t A321891 nmax=4; Select[Union[Prime[Range[nmax]]^3 + 2, Prime[Range[Prime[nmax]^3]] + 8], PrimeQ] (* _Amiram Eldar_, Nov 21 2018 *) %o A321891 (MiniZinc) %o A321891 include "globals.mzn"; %o A321891 int: n = 2; %o A321891 int: max_val = 1200000; %o A321891 array[1..n+1] of var 2..max_val: x; %o A321891 % primes between 2..max_valset of int: %o A321891 prime = 2..max_val diff { i | i in 2..max_val, j in 2..ceil(sqrt(i)) where i mod j = 0} ; %o A321891 set of int: primes; primes = prime union {2}; %o A321891 solve satisfy; %o A321891 constraint all_different(x) /\ x[1] in primes /\ x[2] in primes /\ x[3] in primes /\ %o A321891 pow(x[1], 3)+pow(x[2], 1)= x[3] ; %o A321891 output [ show(x)] %o A321891 (PARI) list(lim)=my(v=List()); forprime(p=3,sqrtnint((lim\=1)-2,3), if(isprime(p^3+2), listput(v,p^3+2))); forprime(p=11,lim+8, if(isprime(p-8), listput(v,p))); Set(v) \\ _Charles R Greathouse IV_, Jan 13 2025 %o A321891 (PARI) select( {is_A321891(n)=isprime(n)&& (isprime(n-8)|| (ispower(n-2, 3, &n)&&isprime(n)))}, [1..1234]) \\ _M. F. Hasler_, Jan 13 2025 %Y A321891 Union of A048636 and A092402. - _Michel Marcus_, Nov 21 2018 %K A321891 nonn %O A321891 1,1 %A A321891 _Pierandrea Formusa_, Nov 20 2018 %E A321891 More terms from _Amiram Eldar_, Nov 21 2018