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