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 A368196 #48 Jan 31 2024 07:58:12 %S A368196 4,6,9,13,2,5,2,6,9,13,2,7,2,8,12,17,4,6,9,13,2,9,13,2,10,14,20,28,37, %T A368196 6,9,13,2,11,4,6,9,13,2,12,17,4,6,9,13,2,13,2,14,20,28,37,6,9,13,2,15, %U A368196 21,29,6,9,13,2,16,22,30,40,52,67,6,9,13,2,17,4,6,9,13,2 %N A368196 Irregular triangle read by rows where row n is the trajectory starting from n and ending with 2 of the map x -> A368241(x). %C A368196 It is conjectured that every starting n reaches 2 eventually. (If not then the sequence has an infinite final row.) %C A368196 Map A368241(x) decreases to the prime gap x-prevprime(x) when x is prime, or increases to x+primepi(x) otherwise, and will reach 2 when x is the greater of a twin prime pair (A006512, preceding prime gap 2). %C A368196 Prime gaps and x+primepi(x) may become large, but if the twin prime conjecture is true then there would be large twin primes they might reach too. %F A368196 T(n,0) = n. %F A368196 T(n,k) = A368241(T(n,k-1)) for k >= 1. %e A368196 Table T(n,k) begins: %e A368196 n\k 0 1 2 3 4 5 6 7 8 9 %e A368196 -------------------------------------------- %e A368196 4: 4 6 9 13 2 %e A368196 5: 5 2 %e A368196 6: 6 9 13 2 %e A368196 7: 7 2 %e A368196 8: 8 12 17 4 6 9 13 2 %e A368196 9: 9 13 2 %e A368196 10: 10 14 20 28 37 6 9 13 2 %e A368196 11: 11 4 6 9 13 2 %e A368196 12: 12 17 4 6 9 13 2 %e A368196 13: 13 2 %e A368196 14: 14 20 28 37 6 9 13 2 %e A368196 15: 15 21 29 6 9 13 2 %e A368196 16: 16 22 30 40 52 67 6 9 13 2 %e A368196 17: 17 4 6 9 13 2 %e A368196 18: 18 25 34 45 59 6 9 13 2 %e A368196 19: 19 2 %e A368196 20: 20 28 37 6 9 13 2 %o A368196 (PARI) row(n) = my(list=List(n)); while(n!=2, n = if (isprime(n), n - precprime(n-1), n + primepi(n)); listput(list, n)); Vec(list); \\ _Michel Marcus_, Dec 17 2023 %Y A368196 Cf. A368241. %Y A368196 Cf. A000720, A005171, A010051, A006512. %K A368196 nonn,tabf %O A368196 4,1 %A A368196 _Hendrik Kuipers_, Dec 16 2023