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 A105318 #28 May 22 2025 00:32:42 %S A105318 5,3,271,169219,356498179,2500282512131,20594058719087111, %T A105318 2185103796349763249 %N A105318 Starting prime for the smallest prime Pythagorean sequence for n triangles. %C A105318 Smallest prime p(0) such that the n-chain governed by recurrence p(i+1)=(p(i)^2 + 1)/2 are all primes. Equivalently, least prime p(0) that generates a sequence of n 2-prime triangles, where p(k) is the hypotenuse of the k-th triangle and the leg of the (k+1)-th triangle. %C A105318 For n>2, the last digit of a(n) is 1 or 9. - _Ya-Ping Lu_, May 17 2025 %D A105318 Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 258. %H A105318 C. K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php/PrmPythagTriples.html">Pythagorean triples</a> %H A105318 H. Dubner, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;905120b.9907">Posting to Number Theory List</a> %H A105318 H. Dubner and T. Forbes, <a href="https://t5k.org/references/docs/pyth0704.pdf">Prime Pythagorean Triangles</a> %H A105318 H. Dubner and T. Forbes, Journal of Integer Sequences, Vol. 4(2001) #01.2.3, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL4/DUBNER/pyth.html">Prime Pythagorean triangles</a> %H A105318 T. Forbes, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;12f3035e.9907">Posting to Number Theory List</a> %H A105318 T. Forbes, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;c670c8fd.9910">Posting to Number Theory List</a> %e A105318 5 is a(1) because (5^2+1)/2 = 13 is prime, but (13^2+1)/2 = 85 is not. %o A105318 (Python) %o A105318 from sympy import isprime, nextprime; m = lambda x: (x*x+1)//2; p = 2; D = {} %o A105318 while p < 2185103796349763249: %o A105318 p = nextprime(p); q = m(p); n = 1 %o A105318 while isprime(q) and isprime(m(q)): n += 1; q = m(q) %o A105318 if n not in D: D.update({n: p}) %o A105318 [print(k, end =', ') for key, k in sorted(D.items())] # _Ya-Ping Lu_, May 17 2025 %Y A105318 Cf. A048161, A048270, A048295, A308635, A308636. %K A105318 hard,more,nonn %O A105318 1,1 %A A105318 _Lekraj Beedassy_, Apr 26 2005 %E A105318 a(1) added by _T. D. Noe_, Jan 29 2011