OFFSET
1,1
EXAMPLE
37 is a term because iterating the map on 37, which is '100101' in binary format, gives: 37 -> 1370 -> 1876901, which in binary format is '111001010001110100101' ending with '100101'.
PROG
(Python)
from sympy import isprime; R = []
for i in range(0, 1000):
t = 2**i; L = []
while t not in L: L.append(t); t = (t*t + 1) % 2**(i+1)
{R.append(j) for j in {L[-1], L[-2]} if j not in R and isprime(j)}
R.sort(); print(*R, sep = ', ')
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Ya-Ping Lu, Apr 13 2022
STATUS
approved