A376201 Fixed points in A376198.
1, 2, 3, 4, 11, 12, 27, 28, 59, 60, 123, 124, 125, 126, 255, 256, 515, 516, 517, 518, 519, 520, 1043, 1044, 1045, 1046, 1047, 1048, 2099, 2100, 2101, 2102, 2103, 2104, 2105, 2106, 2107, 2108, 2109, 2110, 4223, 4224, 4225, 4226, 4227, 4228, 8459, 8460, 16923, 16924, 16925, 16926, 33855, 33856, 67715, 67716, 67717, 67718, 67719
Offset: 1
Keywords
Links
- Michael S. Branicky, Table of n, a(n) for n = 1..398
Programs
-
Python
from itertools import count, islice from sympy import isprime, nextprime def agen(): # generator of terms an, smc, smp = 2, 4, 3 yield from [1, 2] for n in count(3): if not isprime(an): an = smp if an == 2*smp else smc else: an = smp if smp < smc else smc if an == smp: smp = nextprime(smp) else: smc += 1 while isprime(smc): smc += 1 if n == an: yield an print(list(islice(agen(), 59))) # Michael S. Branicky, Oct 03 2024
Comments