login
A268728
Square array A(row,col) = B(row,(2*col)-1), where B(p,2q-1) = 0 if gcd(p,2q-1) > 1, and A269158(p,q) otherwise. Array is read by descending antidiagonals as A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), ...
6
0, 0, 1, 0, 2, 1, 0, 7, 0, 0, 0, 4, 3, 0, 1, 0, 13, 3, 0, 2, 0, 0, 14, 0, 0, 0, 0, 1, 0, 11, 1, 0, 2, 4, 0, 1, 0, 8, 1, 0, 1, 7, 7, 2, 1, 0, 25, 0, 0, 1, 0, 0, 7, 0, 0, 0, 26, 3, 0, 6, 15, 5, 4, 0, 0, 1, 0, 31, 3, 0, 0, 10, 3, 13, 4, 0, 2, 1, 0, 28, 0, 0, 6, 0, 2, 14, 0, 6, 0, 0, 1, 0, 21, 1, 0, 1, 26, 7, 11, 4, 12, 0, 3, 0, 0
OFFSET
1,5
COMMENTS
The array gives the values of bivariate function B(p,q) which is well-defined only when q is odd, thus while here its argument p obtains all integer values from 1 onward, argument q gets only odd numbers 1, 3, 5, 7, 9, ... as its values.
Any row n occurs also as row (4^k * n), for all k >= 0.
FORMULA
A(row,col) = B(row,(2*col)-1), where function B(p,q) [only odd values allowed for q] is defined as: If gcd(p,q) > 1, B(p,q) = 0, otherwise B(p,q) = F(p,q) = A269158(p,(q+1)/2), function F defined as in A269158.
EXAMPLE
The top left [1 .. 16] x [1 .. 25] section of the array:
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 2, 7, 4, 13, 14, 11, 8, 25, 26, 31, 28, 21, 22, 19, 16
1, 0, 3, 3, 0, 1, 1, 0, 3, 3, 0, 1, 1, 0, 3, 3
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 2, 0, 2, 1, 1, 6, 0, 6, 1, 5, 6, 0, 6, 5, 5
0, 0, 4, 7, 0, 15, 10, 0, 26, 25, 0, 29, 20, 0, 16, 19
1, 0, 7, 0, 5, 3, 2, 7, 2, 1, 0, 3, 1, 4, 5, 4
1, 2, 7, 4, 13, 14, 11, 8, 25, 26, 31, 28, 21, 22, 19, 16
1, 0, 0, 4, 0, 4, 9, 0, 12, 1, 0, 0, 12, 0, 4, 9
0, 0, 0, 6, 12, 15, 13, 0, 31, 27, 26, 26, 0, 16, 22, 21
1, 2, 0, 0, 13, 0, 7, 11, 14, 13, 14, 3, 8, 10, 10, 15
1, 0, 3, 3, 0, 1, 1, 0, 3, 3, 0, 1, 1, 0, 3, 3
1, 0, 3, 7, 0, 14, 0, 6, 1, 11, 14, 8, 8, 9, 12, 11
0, 2, 0, 0, 8, 13, 9, 15, 27, 27, 0, 31, 20, 18, 22, 20
1, 0, 0, 0, 0, 0, 11, 0, 9, 3, 0, 15, 0, 0, 2, 15
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
1, 2, 7, 3, 13, 15, 0, 8, 0, 8, 17, 11, 8, 14, 18, 10
0, 0, 7, 0, 0, 10, 2, 0, 21, 27, 0, 28, 25, 0, 23, 25
1, 0, 0, 2, 0, 14, 10, 0, 25, 0, 11, 19, 8, 9, 10, 16
1, 2, 0, 2, 1, 1, 6, 0, 6, 1, 5, 6, 0, 6, 5, 5
1, 0, 0, 0, 0, 15, 11, 0, 0, 26, 0, 10, 17, 0, 10, 15
0, 0, 7, 4, 0, 0, 12, 3, 23, 23, 17, 31, 29, 28, 25, 31
1, 2, 3, 4, 1, 0, 13, 8, 26, 0, 31, 0, 13, 19, 8, 11
0, 0, 4, 7, 0, 15, 10, 0, 26, 25, 0, 29, 20, 0, 16, 19
1, 0, 0, 0, 5, 1, 1, 0, 25, 25, 0, 28, 0, 12, 25, 13
PROG
(Scheme)
(define (A268728 n) (A268728bi (A002260 n) (+ -1 (* 2 (A004736 n)))))
(define (A268728bi p q) (if (not (odd? q)) (error "A268728bi: the second argument should be odd: " p q) (let loop ((p p) (q q) (s 0)) (cond ((zero? p) 0) ((= 1 p) s) ((odd? p) (loop (modulo q p) p (A003987bi s (A004198bi p q)))) (else (loop (/ p 2) q (A003987bi s (A003987bi q (/ (- q 1) 2)))))))))
;; Alternative implementation using the definition given in A269158:
(define (A268728 n) (let ((p (A002260 n)) (q (+ -1 (* 2 (A004736 n))))) (if (< 1 (gcd p q)) 0 (A269158auxbi p q))))
CROSSREFS
Transpose: A268729.
Column 1: Seems to be 0 followed by A039982.
Cf. A065621 (occurs as row 2, row 8, and in general, as any row 2^(2n+1) for n >= 0).
Cf. A268829, A269158 (variants).
Sequence in context: A358188 A117651 A373426 * A187196 A187197 A375368
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Feb 19 2016
STATUS
approved