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.
LINKS
FORMULA
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 (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:
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Antti Karttunen, Feb 19 2016
STATUS
approved