A077610 Triangle in which n-th row lists unitary divisors of n.
1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 2, 3, 6, 1, 7, 1, 8, 1, 9, 1, 2, 5, 10, 1, 11, 1, 3, 4, 12, 1, 13, 1, 2, 7, 14, 1, 3, 5, 15, 1, 16, 1, 17, 1, 2, 9, 18, 1, 19, 1, 4, 5, 20, 1, 3, 7, 21, 1, 2, 11, 22, 1, 23, 1, 3, 8, 24, 1, 25, 1, 2, 13, 26, 1, 27, 1, 4, 7, 28, 1, 29, 1, 2, 3, 5, 6, 10, 15, 30
Offset: 1
Examples
1; 1, 2; 1, 3; 1, 4; 1, 5; 1, 2, 3, 6; 1, 7; 1, 8; 1, 9; 1, 2, 5, 10; 1, 11;
Links
- Reinhard Zumkeller, Rows n=1..1000 of triangle, flattened
- Eckford Cohen, Arithmetical functions associated with the unitary divisors of an integer, Mathematische Zeitschrift, Vol. 74 (1960), pp. 66-80.
- R. Vaidyanathaswamy, The theory of multiplicative arithmetic functions, Transactions of the American Mathematical Society, Vol. 33, No. 2 (1931), pp. 579-662.
- Eric Weisstein's World of Mathematics, Unitary Divisor.
- Index entries for sequences related to enumerating the rationals.
Programs
-
Haskell
a077610 n k = a077610_row n !! k a077610_row n = [d | d <- [1..n], let (n',m) = divMod n d, m == 0, gcd d n' == 1] a077610_tabf = map a077610_row [1..] -- Reinhard Zumkeller, Feb 12 2012
-
Maple
with(numtheory); # returns the number of unitary divisors of n and a list of them, from N. J. A. Sloane, May 01 2013 f:=proc(n) local ct,i,t1,ans; ct:=0; ans:=[]; t1:=divisors(n); for i from 1 to nops(t1) do d:=t1[i]; if igcd(d,n/d)=1 then ct:=ct+1; ans:=[op(ans),d]; fi; od: RETURN([ct,ans]); end; # Alternatively: isUnitary := (n, d) -> igcd(n, d) = d and igcd(n/d, d) = 1: aList := n -> select(k -> isUnitary(n, k), [seq(1..n)]): # Peter Luschny, Jun 13 2025
-
Mathematica
row[n_] := Select[ Divisors[n], GCD[#, n/#] == 1 &]; Table[row[n], {n, 1, 30}] // Flatten (* Jean-François Alcover, Oct 22 2012 *)
-
PARI
row(n)=my(f=factor(n),k=#f~); Set(vector(2^k,i, prod(j=1,k, if(bittest(i,j-1),1,f[j,1]^f[j,2])))) v=[];for(n=1,20,v=concat(v,row(n)));v \\ Charles R Greathouse IV, Sep 02 2015
-
PARI
row(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d);} \\ Michel Marcus, Oct 11 2015
-
Python
from math import gcd def is_unitary(n, d) -> bool: return gcd(n, d) == d and gcd(n//d, d) == 1 def aList(n) -> list[int]: return [k for k in range(1, n+1) if is_unitary(n, k)] for n in range(1, 31): print(aList(n)) # Peter Luschny, Jun 13 2025
Formula
d is unitary divisor of n <=> gcd(n, d) = d and gcd(n/d, d) = 1. - Peter Luschny, Jun 13 2025
Comments