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 A353601 #10 Apr 29 2022 17:30:53 %S A353601 5,7,8,18,65,17,325,99,38,7,1432,485,1445,18,37,2050625,5357,27493, %T A353601 325,18,18,1299108307,12807125,9077774,1432,325,325,65 %N A353601 Square array read by downward antidiagonals: A(n, 1) = A185103(n) and A(n, k) = A185103(A(n, k-1)) for k > 1. %C A353601 What is the asymptotic behavior of the rows of the array? Do all rows increase without bound, or do some rows enter a cycle? %e A353601 Array starts as follows: %e A353601 5, 7, 18, 325, 1432, ... %e A353601 8, 65, 99, 485, 5357, ... %e A353601 17, 38, 1445, 27493, 9077774, ... %e A353601 7, 18, 325, 1432, 2050625, ... %e A353601 37, 18, 325, 1432, 2050625, ... %e A353601 ... %o A353601 (PARI) a185103(n) = for(b=2, oo, if(Mod(b, n^2)^(n-1)==1, return(b))) %o A353601 a(n, k) = if(k==1, return(a185103(n)), return(a185103(a(n, k-1)))) %o A353601 array(rows, cols) = for(x=2, rows+1, for(y=1, cols, print1(a(x, y), ", ")); print("")) %o A353601 array(5, 5) \\ Print initial 5 rows and 5 columns of array %o A353601 (Python) %o A353601 from functools import lru_cache %o A353601 def A185103(n): %o A353601 k, n2 = 2, n*n %o A353601 while pow(k, n-1, n2) != 1: k += 1 %o A353601 return k %o A353601 @lru_cache() %o A353601 def T(n, k): %o A353601 if k == 1: return A185103(n) %o A353601 return A185103(T(n, k-1)) %o A353601 def auptodiag(maxd): %o A353601 return [T(d+2-j, j) for d in range(1, maxd+1) for j in range(d, 0, -1)] %o A353601 print(auptodiag(6)) # _Michael S. Branicky_, Apr 29 2022 %Y A353601 Cf. A185103. %K A353601 nonn,tabl,more %O A353601 2,1 %A A353601 _Felix Fröhlich_, Apr 29 2022 %E A353601 a(16)-a(28) from _Michael S. Branicky_, Apr 29 2022