cp's OEIS Frontend

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.

A105318 Starting prime for the smallest prime Pythagorean sequence for n triangles.

Original entry on oeis.org

5, 3, 271, 169219, 356498179, 2500282512131, 20594058719087111, 2185103796349763249
Offset: 1

Views

Author

Lekraj Beedassy, Apr 26 2005

Keywords

Comments

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.
For n>2, the last digit of a(n) is 1 or 9. - Ya-Ping Lu, May 17 2025

Examples

			5 is a(1) because (5^2+1)/2 = 13 is prime, but (13^2+1)/2 = 85 is not.
		

References

  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 258.

Crossrefs

Programs

  • Python
    from sympy import isprime, nextprime; m = lambda x: (x*x+1)//2; p = 2; D = {}
    while p < 2185103796349763249:
        p = nextprime(p); q = m(p); n = 1
        while isprime(q) and isprime(m(q)): n += 1; q = m(q)
        if n not in D: D.update({n: p})
    [print(k, end =', ') for key, k in sorted(D.items())] # Ya-Ping Lu, May 17 2025

Extensions

a(1) added by T. D. Noe, Jan 29 2011