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 A173236 #16 Apr 22 2025 04:00:07 %S A173236 2,3,5,17,53,257,677,3329,13313,35153,65537,2768897,13631489, %T A173236 2303721473,3489660929,4942652417,11341398017,10859007357953, %U A173236 1594691292233729,31403151600910337,310144109150467073,578220423796228097 %N A173236 Primes of the form 2^r * 13^s + 1. %C A173236 Necessarily r is even (elementary proof by induction). %C A173236 s=0 is (trivial) case of 2 and the known five Fermat primes: 2, 3, 5, 17, 257, 65537 (A092506). %C A173236 Fermat prime exponents r are 0, 1, 2, 4, 8, 16. %D A173236 Emil Artin, Galoissche Theorie, Verlag Harri Deutsch, Zürich, 1973. %D A173236 Leonard E. Dickson, History of the Theory of numbers, vol. I, Dover Publications, 2005. %D A173236 Paulo Ribenboim, Wilfrid Keller, and Joerg Richstein, Die Welt der Primzahlen, Springer-Verlag GmbH Berlin, 2006. %e A173236 2^0*13^0 + 1 = 2 = prime(1) => a(1). %e A173236 2^10*13^1 + 1 = 13313 = prime(1581) => a(9). %e A173236 list of (r,s): (0,0), (1,0), (2,0), (4,0), (2,1), (8,0), (2,2), (8,1), (10,1), (4,3), (16,0), (14,2), (20,1), (20,3), (28,1), (10,6), (26,2), (10,9), (32,5), (40,4), (10,13), (22,10), (32,8), (48,4), (20,13), (2,18), (28,11), (50,6). %o A173236 (GAP) %o A173236 K:=10^7;; # to get all terms <= K. %o A173236 A:=Filtered([1..K],IsPrime);; %o A173236 B:=List(A,i->Factors(i-1));; %o A173236 C:=[];; for i in B do if Elements(i)=[2] or Elements(i)=[2,13] then Add(C,Position(B,i)); fi; od; %o A173236 A173236:=Concatenation([2],List(C,i->A[i])); # _Muniru A Asiru_, Sep 10 2017 %o A173236 (Python) %o A173236 from itertools import count, islice %o A173236 from sympy import isprime, integer_log %o A173236 def A173236_gen(): # generator of terms %o A173236 def bisection(f,kmin=0,kmax=1): %o A173236 while f(kmax) > kmax: kmax <<= 1 %o A173236 kmin = kmax >> 1 %o A173236 while kmax-kmin > 1: %o A173236 kmid = kmax+kmin>>1 %o A173236 if f(kmid) <= kmid: %o A173236 kmax = kmid %o A173236 else: %o A173236 kmin = kmid %o A173236 return kmax %o A173236 def g(n): %o A173236 def f(x): return n+x-sum(((x-1)//13**i).bit_length() for i in range(integer_log(x-1,13)[0]+1)) %o A173236 return bisection(f,n+1,n+1) %o A173236 return filter(lambda n:isprime(n), map(g,count(1))) %o A173236 A173236_list = list(islice(A173236_gen(),30)) # _Chai Wah Wu_, Mar 31 2025 %Y A173236 Cf. A092506, A005105, A092506, A173062. %K A173236 nonn %O A173236 1,1 %A A173236 Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Feb 13 2010