This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A374235 #6 Jul 02 2024 02:38:51 %S A374235 1,2,4,68,46,221,757,5518,65106,1293698,3997147,4009564363 %N A374235 a(n) is the least number k such that A071866(k) = n, or -1 if no such k exists. %C A374235 The corresponding primes, prime(a(n)), are 2, 3, 7, 337, 199, 1381, 5749, 54217, 815729, 20388583, 67816457, 97253646709, ... . %C A374235 a(14) > 7.5*10^10, if it is not -1. %t A374235 seq[len_, max_] := Module[{s = Table[0, len], p1 = 2, c = 0, k = 1, i}, While[c < len && p1 < max, p2 = NextPrime[p1]; i = Length[ContinuedFraction[p2/p1]] - 1; If[i <= len && s[[i]] == 0, c++; s[[i]] = k]; p1 = p2; k++]; s]; seq[9, 10^7] %o A374235 (PARI) seq(len, pmax = oo) = {my(s = vector(len), p1 = 2, c = 0, k = 1, i); while(c < len && p1 < pmax, p2 = nextprime(p1+1); i = length(contfrac(p2/p1)) - 1; if(i <= len && s[i] == 0, c++; s[i] = k); p1 = p2; k++); s;} %Y A374235 Cf. A071866. %K A374235 nonn,more %O A374235 2,2 %A A374235 _Amiram Eldar_, Jul 01 2024