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.

A350590 Prime numbers p such that iterating the map m -> m^2 + 1 on p generates a number ending with p.

Original entry on oeis.org

2, 5, 7, 677, 948901, 55904677, 88948901, 36414201356422028396069993813455904677, 8964456980291877636414201356422028396069993813455904677, 711873588184178964456980291877636414201356422028396069993813455904677
Offset: 1

Views

Author

Ya-Ping Lu, Jan 07 2022

Keywords

Comments

Primes in A350130. All terms, except the first two terms, end with either 1 or 7.
It takes six iterations for a term in the sequence to generate a number ending with the term itself.
If two terms, a(i) and a(j) with i < j, share the same last digit of 1 or 7, then a(j) ends with a(i). For example, a(5)=948901, a(7)=88948901, and a(11)=8941500847661758065828477233177642295842210081239701539110201588948901. a(11) ends with a(7), which ends with a(5).

Examples

			2 is a term because 2 is a prime and iterating the map on 2 gives: 2 -> 5 -> 26 -> 677 -> 458330 -> 210066388901 -> 44127887745906175987802, which ends with 2.
		

Crossrefs

Programs

  • Python
    from sympy import isprime; R = []
    for i in range(1, 100):
        m = 1; L = [m]; m = (m*m+1)%10**i
        while m not in L: L.append(m); m = (m*m+1)%10**i
        del L[:L.index(m)]; {R.append(j) for j in L if isprime(j) and j not in R}
    R.sort(); print(*R, sep = ", ")