A350130 Integers m such that iterating the map f(x) = x^2 + 1 on m generates a number ending with m.
0, 1, 2, 5, 6, 7, 26, 30, 77, 205, 330, 677, 802, 901, 1205, 2026, 4330, 4677, 7802, 8901, 48901, 52026, 71205, 74330, 107802, 152026, 271205, 474330, 904677, 948901, 2152026, 5904677, 7271205, 8948901, 9107802, 10474330, 22152026, 55904677, 77271205, 88948901
Offset: 1
Programs
-
PARI
isok(m) = {my(mm=m); for (i=1, 6, mm = mm^2+1;); !((mm-m) % 10^(#Str(m)));} \\ Michel Marcus, Feb 16 2022
-
Python
for n in range(0, 10**11): s = len(str(n)); t = n; L = set() while t not in L: L.add(t); t = (t*t+1) % 10**s if t == n: print(n, end = ', ')
Comments