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 A346156 #21 Jul 13 2021 01:37:08 %S A346156 3,7,11,13,19,31,43,67,73,131,157,211,223,241,307,421,463,521,601,631, %T A346156 733,739,757,1123,1303,1483,1723,1741,2551,2971,3307,3391,3541,3907, %U A346156 4099,4423,4831,4931,5113,5701,5851,6007,6163,6481,6571,8011,8191,9283,9901,10303,11131,12211,12433,13807 %N A346156 Primes of the form x^k+x+1 where k >= 2 and x >= 1. %C A346156 Primes p such that p-1 is in A253913. %C A346156 Primes with more than one representation of this form include 31 = 3^3+3+1 = 5^2+5+1 and 131 = 2^7+2+1 = 5^3+5+1. Are there any others? %C A346156 There are no others with more than one representation (except 3, trivially) < 10^19 (first 170385840 terms). - _Michael S. Branicky_, Jul 08 2021 %H A346156 Robert Israel, <a href="/A346156/b346156.txt">Table of n, a(n) for n = 1..10000</a> %e A346156 a(3) = 11 is a term because 11 = 2^3+2+1 and is prime. %p A346156 N:= 10^8: # for terms <= N %p A346156 S:= {3}: %p A346156 for k from 2 to ilog2(N-1) do %p A346156 S:= S union select(t -> t<= N and isprime(t),{seq(x^k+x+1,x=2..floor(N^(1/k)))}): %p A346156 od: %p A346156 sort(convert(S,list)); %o A346156 (Python) %o A346156 from sympy import isprime %o A346156 def aupto(lim): %o A346156 xkx = set(x**k + x + 1 for k in range(2, lim.bit_length()) for x in range(int(lim**(1/k))+2)) %o A346156 return sorted(filter(isprime, filter(lambda t: t<=lim, xkx))) %o A346156 print(aupto(14000)) # _Michael S. Branicky_, Jul 07 2021 %Y A346156 Cf. A253913, A346154. %K A346156 nonn %O A346156 1,1 %A A346156 _J. M. Bergot_ and _Robert Israel_, Jul 07 2021