cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A225174 Square array read by antidiagonals: T(m,n) = greatest common unitary divisor of m and n.

Original entry on oeis.org

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, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 6, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 1, 1, 1, 1, 5, 1, 3, 1, 1
Offset: 1

Views

Author

N. J. A. Sloane, May 01 2013

Keywords

Examples

			Array begins
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, ...
1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 3, ...
1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 4, ...
1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, ...
1, 2, 3, 1, 1, 6, 1, 1, 1, 2, 1, 3, ...
1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, ...
1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, ...
...
The unitary divisors of 3 are 1 and 3, those of 6 are 1,2,3,6; so T(6,3) = T(3,6) = 3.
		

References

  • M. Lal, H. Wareham and R. Mifflin, Iterates of the bi-unitary totient function, Utilitas Math., 10 (1976), 347-350.

Crossrefs

See A034444, A077610 for unitary divisors of n.
Different from A059895.

Programs

  • Maple
    # returns the greatest common unitary divisor of m and n
    f:=proc(m,n)
    local i,ans;
    ans:=1;
    for i from 1 to min(m,n) do
    if ((m mod i) = 0) and (igcd(i,m/i) = 1)  then
       if ((n mod i) = 0) and (igcd(i,n/i) = 1)  then ans:=i; fi;
    fi;
    od;
    ans; end;
  • Mathematica
    f[m_, n_] := Module[{i, ans=1}, For[i=1, i<=Min[m, n], i++, If[Mod[m, i]==0 && GCD[i, m/i]==1, If[Mod[n, i]==0 && GCD[i, n/i]==1, ans=i]]]; ans];
    Table[f[m-n+1, n], {m, 1, 14}, {n, 1, m}] // Flatten (* Jean-François Alcover, Jun 19 2018, translated from Maple *)
  • PARI
    up_to = 20100; \\ = binomial(200+1,2)
    A225174sq(m,n) = { my(a=min(m,n),b=max(m,n),md=0); fordiv(a,d,if(0==(b%d)&&1==gcd(d,a/d)&&1==gcd(d,b/d),md=d)); (md); };
    A225174list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, if(i++ > up_to, return(v)); v[i] = A225174sq((a-(col-1)),col))); (v); };
    v225174 = A225174list(up_to);
    A225174(n) = v225174[n]; \\ Antti Karttunen, Nov 28 2018

Formula

T(m,n) = T(n,m) = A165430(n,m).