OFFSET
2,1
COMMENTS
The starting offset of the sequence giving the terms of square array is 2. However, we can tacitly assume that a(1) = 1 when the sequence is used as a permutation of natural numbers. However, term 1 itself is out of the array.
The choice of offset = 2 for the terms starting in rows >= 1 is motivated by the desire to have a permutation of the integers n -> a(n) with a(n) = A(A002260(n-1), A004736(n-1)) for n > 1 and a(1) := 1. However, since this sequence is declared as a "table", offset = 2 would mean that the first *row* (not element) has index 2. I think the sequence should have offset = 1 and the permutation of the integers would be n -> a(n-1) with a(0) := 1 (if a(1) = A(1,1) = 2). Or, the sequence could have offset 0, with an additional row 0 of length 1 with the only element a(0) = A(0,1) = 1, the permutation still being n -> a(n-1) if a(n=0, 1, 2, ...) = (1, 2, 4, ...). This would be in line with considering 1 as the first ludic number, and A(n, 1) = A003309(n+1) for n >= 0. - M. F. Hasler, Nov 12 2024
LINKS
FORMULA
A(r, c) = A(r, c-P(r)) + S(r) = A(r, (c-1)%P(r) + 1) + floor((c-1)/P(r))*S(r) for 1 <= r <= 7, with periods P = (1, 1, 2, 8, 48, 480, 5760) = A005867(0..6) and shifts S = (2, 6, 30, 210, 2310, 30030, 510510) = A002110(1..7) = A376237(2..8). I conjecture that the pattern will continue, but the precise details are to be specified. - M. F. Hasler, Nov 12 2024
EXAMPLE
The top left corner of the array:
2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26
3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75
5, 19, 35, 49, 65, 79, 95, 109, 125, 139, 155, 169, 185
7, 31, 59, 85, 113, 137, 163, 191, 217, 241, 269, 295, 323
11, 55, 103, 151, 203, 251, 299, 343, 391, 443, 491, 539, 587
13, 73, 133, 197, 263, 325, 385, 449, 511, 571, 641, 701, 761
17, 101, 187, 281, 367, 461, 547, 629, 721, 809, 901, 989, 1079
23, 145, 271, 403, 523, 655, 781, 911, 1037, 1157, 1289, 1417, 1543
25, 167, 311, 457, 599, 745, 883, 1033, 1181, 1321, 1469, 1615, 1753
29, 205, 371, 551, 719, 895, 1073, 1243, 1421, 1591, 1771, 1945, 2117
...
MATHEMATICA
rows = 12; cols = 12; t = Range[2, 3000]; r = {1}; n = 1; While[n <= rows, k = First[t]; AppendTo[r, k]; t0 = t; t = Drop[t, {1, -1, k}]; ro[n++] = Complement[t0, t][[1 ;; cols]]]; A = Array[ro, rows]; Table[ A[[n - k + 1, k]], {n, 1, rows}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Mar 14 2016, after Ray Chandler *)
PROG
(Scheme)
(define (A255127bi row col) ((rowfun_n_for_A255127 row) col))
;; definec-macro memoizes its results:
(definec (rowfun_n_for_A255127 n) (if (= 1 n) (lambda (n) (+ n n)) (let* ((rowfun_for_remaining (rowfun_n_for_remaining_numbers (- n 1))) (eka (rowfun_for_remaining 0))) (COMPOSE rowfun_for_remaining (lambda (n) (* eka (- n 1)))))))
(definec (rowfun_n_for_remaining_numbers n) (if (= 1 n) (lambda (n) (+ n n 3)) (let* ((rowfun_for_prevrow (rowfun_n_for_remaining_numbers (- n 1))) (off (rowfun_for_prevrow 0))) (COMPOSE rowfun_for_prevrow (lambda (n) (+ 1 n (floor->exact (/ n (- off 1)))))))))
CROSSREFS
Transpose: A255129.
Inverse: A255128. (When considered as a permutation of natural numbers with a(1) = 1).
Main diagonal: A255410.
Row 1: A005843, Row 2: A016945, Row 3: A255413, Row 4: A255414, Row 5: A255415, Row 6: A255416, Row 7: A255417, Row 8: A255418, Row 9: A255419.
A192607 gives all the numbers right of the leftmost column, and A192506 gives the composites among them.
AUTHOR
Antti Karttunen, Feb 22 2015
STATUS
approved