
MATHEMATICA

f[p_, k_] := (4^(p^(k + 1)) + 1)/(4^(p^k) + 1);
seq[max_] := Module[{s = {}, p = 3, f1, k, addFlag = True}, While[addFlag, If[p == 5, Continue[]]; k = 1; addFlag = False; While[(f1 = f[p, k]) < max, AppendTo[s, f1]; addFlag = True; k++]; p = NextPrime[p, If[p == 3, 2, 1]]]; Sort[s]]; seq[10^80]
