Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Symmetric matrix read by antidiagonals: f(i,j) = 1 + gcd(f(i-1,j), f(i,j-1)), where f(1,j) and f(i,1) are 1.
1

%I #22 Aug 03 2022 23:25:08

%S 1,1,1,1,2,1,1,2,2,1,1,2,3,2,1,1,2,2,2,2,1,1,2,3,3,3,2,1,1,2,2,4,4,2,

%T 2,1,1,2,3,3,5,3,3,2,1,1,2,2,4,2,2,4,2,2,1,1,2,3,3,3,3,3,3,3,2,1,1,2,

%U 2,4,4,4,4,4,4,2,2,1,1,2,3,3,5,5,5,5,5,3,3,2,1

%N Symmetric matrix read by antidiagonals: f(i,j) = 1 + gcd(f(i-1,j), f(i,j-1)), where f(1,j) and f(i,1) are 1.

%C This matrix when displayed in a gray scale, from least to greatest, forms spikes of increasing numbers because large sections of the antidiagonals are the same number. See examples section.

%H Michael De Vlieger, <a href="/A330190/b330190.txt">Table of n, a(n) for n = 1..11325</a> (Rows n = 1..150, flattened)

%H Nathaniel J. Strout, <a href="/A330190/a330190.png">1000 X 1000 grid</a>

%H Michael De Vlieger, <a href="/A330190/a330190_1.png">2048 X 2048 grid</a> with color function where black = 1, red = 2 and magenta represents the maximum value in the grid (i.e., f(312,768) = f(768,312) = 41).

%e An example of a triangle described in the comment:

%e ...........

%e ...........

%e ..........2

%e ........2 3

%e ......2 3 4

%e ....2 3 4 5

%e Array begins:

%e 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...

%e 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, ...

%e 1, 2, 3, 2, 3, 2, 3, 2, 3, 2, ...

%e 1, 2, 2, 3, 4, 3, 4, 3, 4, 3, ...

%e 1, 2, 3, 4, 5, 2, 3, 4, 5, 2, ...

%e 1, 2, 2, 3, 2, 3, 4, 5, 6, 3, ...

%e 1, 2, 3, 4, 3, 4, 5, 6, 7, 2, ...

%e 1, 2, 2, 3, 4, 5, 6, 7, 8, 3, ...

%e 1, 2, 3, 4, 5, 6, 7, 8, 9, 4, ...

%e 1, 2, 2, 3, 2, 3, 2, 3, 4, 5, ...

%e ...

%t f[1, j_] := f[1, j] = 1; f[i_, 1] := f[i, 1] = 1; f[i_, j_] := f[i, j] = 1 + GCD[f[i - 1, j], f[i, j - 1]]; Table[f[m - k + 1, k], {m, 13}, {k, m, 1, -1}] // Flatten (* _Michael De Vlieger_, Aug 03 2022 *)

%o (PARI) T(n)={my(M=matrix(n,n,i,j,1)); for(i=2, n, for(j=2, n, M[i,j] = 1 + gcd(M[i-1,j], M[i,j-1]))); M}

%o { my(A=T(10)); for(i=1, #A, print(A[i,])) } \\ _Andrew Howroyd_, Jan 25 2020

%K nonn,tabl,look

%O 1,5

%A _Nathaniel J. Strout_, Dec 04 2019