login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A350590 Prime numbers p such that iterating the map m -> m^2 + 1 on p generates a number ending with p. 2
2, 5, 7, 677, 948901, 55904677, 88948901, 36414201356422028396069993813455904677, 8964456980291877636414201356422028396069993813455904677, 711873588184178964456980291877636414201356422028396069993813455904677 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
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).
LINKS
EXAMPLE
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.
PROG
(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 = ", ")
CROSSREFS
Sequence in context: A214705 A252283 A007571 * A062621 A306748 A344655
KEYWORD
nonn,base
AUTHOR
Ya-Ping Lu, Jan 07 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 20 14:36 EDT 2024. Contains 375336 sequences. (Running on oeis4.)