OFFSET
1,1
COMMENTS
FORMULA
a(m,n) = 6*floor((m+1)/2)*floor((n+1)/2) + ((-1)^n)*floor((m+1)/2) + ((-1)^m)*floor((n+1)/2), m,n >= 1.
EXAMPLE
Square array begins:
4, 6, 9, 11, 14, 16, 19, 21, 24, 26, ...
6, 8, 13, 15, 20, 22, 27, 29, 34, 36, ...
9, 13, 20, 24, 31, 35, 42, 46, 53, 57, ...
11, 15, 24, 28, 37, 41, 50, 54, 63, 67, ...
14, 20, 31, 37, 48, 54, 65, 71, 82, 88, ...
16, 22, 35, 41, 54, 60, 73, 79, 92, 98, ...
19, 27, 42, 50, 65, 73, 88, 96, 111, 119, ...
21, 29, 46, 54, 71, 79, 96, 104, 121, 129, ...
24, 34, 53, 63, 82, 92, 111, 121, 140, 150, ...
26, 36, 57, 67, 88, 98, 119, 129, 150, 160, ...
...
Note that, for example, the third row (or column) contains numbers that differ by 2 from multiples of 11 = 6*2 - 1, and the eighth row contains numbers that differ by 4 from multiples of 25 = 6*4 + 1.
PROG
(PARI) a(m, n) = 6*floor((m+1)/2)*floor((n+1)/2) + ((-1)^n)*floor((m+1)/2) + ((-1)^m)*floor((n+1)/2);
matrix(7, 7, n, k, a(n, k)) \\ Michel Marcus, Jan 25 2019
CROSSREFS
KEYWORD
AUTHOR
Sally Myers Moite, Jan 23 2019
STATUS
approved