login
A059895
Table a(i,j) = product prime[k]^(Ei[k] AND Ej[k]) where Ei and Ej are the vectors of exponents in the prime factorizations of i and j; AND is the bitwise operation on binary representation of the exponents.
17
1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 2, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 2, 1, 1, 5, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 6, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 7, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, 5, 1, 3, 1, 1, 1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1
OFFSET
1,5
COMMENTS
Analogous to GCD, with AND replacing MIN.
FORMULA
From Antti Karttunen, Apr 11 2017: (Start)
A(x,y) = A059896(x,y) / A059897(x,y).
A(x,y) * A059896(x,y) = A(x,y)^2 * A059897(x,y) = x*y.
(End)
EXAMPLE
The top left 18 X 18 corner of the array:
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2
1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1
1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1
1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1
1, 2, 3, 1, 1, 6, 1, 2, 1, 2, 1, 3, 1, 2, 3, 1, 1, 2
1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1
1, 2, 1, 4, 1, 2, 1, 8, 1, 2, 1, 4, 1, 2, 1, 1, 1, 2
1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 9
1, 2, 1, 1, 5, 2, 1, 2, 1, 10, 1, 1, 1, 2, 5, 1, 1, 2
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1
1, 1, 3, 4, 1, 3, 1, 4, 1, 1, 1, 12, 1, 1, 3, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1
1, 2, 1, 1, 1, 2, 7, 2, 1, 2, 1, 1, 1, 14, 1, 1, 1, 2
1, 1, 3, 1, 5, 3, 1, 1, 1, 5, 1, 3, 1, 1, 15, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 17, 1
1, 2, 1, 1, 1, 2, 1, 2, 9, 2, 1, 1, 1, 2, 1, 1, 1, 18
A(864,1944) = A(2^5*3^3,2^3*3^5) = 2^(5 AND 3)* 3^(3 AND 5) = 2^1*3^1 = 6.
MATHEMATICA
a[i_, i_] := i;
a[i_, j_] := Module[{f1 = FactorInteger[i], f2 = FactorInteger[j], e1, e2}, Scan[(e1[#[[1]]] = #[[2]])&, f1]; Scan[(e2[#[[1]]] = #[[2]])&, f2]; Times @@ (#^BitAnd[e1[#], e2[#]]& /@ Intersection[f1[[All, 1]], f2[[All, 1]]]) ];
Table[a[i - j + 1, j], {i, 1, 15}, {j, 1, i}] // Flatten (* Jean-François Alcover, Jun 19 2018 *)
PROG
(Scheme)
(define (A059895 n) (A059895bi (A002260 n) (A004736 n)))
(define (A059895bi a b) (let loop ((a a) (b b) (m 1)) (cond ((= 1 a) m) ((= 1 b) m) ((equal? (A020639 a) (A020639 b)) (loop (A028234 a) (A028234 b) (* m (expt (A020639 a) (A004198bi (A067029 a) (A067029 b)))))) ((< (A020639 a) (A020639 b)) (loop (A028234 a) b m)) (else (loop a (A028234 b) m)))))
;; Antti Karttunen, Apr 11 2017
KEYWORD
base,easy,nonn,tabl
AUTHOR
Marc LeBrun, Feb 06 2001
EXTENSIONS
Data section extended to 120 terms by Antti Karttunen, Apr 11 2017
STATUS
approved