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.

A077610 Triangle in which n-th row lists unitary divisors of n.

This page as a plain text file.
%I A077610 #56 Aug 03 2025 03:53:23
%S A077610 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,
%T A077610 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,
%U A077610 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
%N A077610 Triangle in which n-th row lists unitary divisors of n.
%C A077610 n-th row = n-th row of A165430 without repetitions. - _Reinhard Zumkeller_, Mar 04 2013
%C A077610 Denominators of sequence of all positive rational numbers ordered as follows:  let m = p(i(1))^e(i(1))*...*p(i(k))^e(i(k)) be the prime factorization of m.  Let S(m) be the vector of rationals p(i(k+1-j))^e(i(k+1-j))/p(i(j))^e(i(j)) for j = 1..k.  The sequence (a(n)) is the concatenation of vectors S(m) for m = 1, 2, ...; for numerators see A229994. - _Clark Kimberling_, Oct 31 2013
%C A077610 The concept of unitary divisors was introduced by the Indian mathematician Ramaswamy S. Vaidyanathaswamy (1894-1960) in 1931. He called them "block factors". The term "unitary divisor" was coined by Cohen (1960). - _Amiram Eldar_, Mar 09 2024
%H A077610 Reinhard Zumkeller, <a href="/A077610/b077610.txt">Rows n=1..1000 of triangle, flattened</a>
%H A077610 Eckford Cohen, <a href="https://doi.org/10.1007/BF01180473">Arithmetical functions associated with the unitary divisors of an integer</a>, Mathematische Zeitschrift, Vol. 74 (1960), pp. 66-80.
%H A077610 R. Vaidyanathaswamy, <a href="https://doi.org/10.1090/S0002-9947-1931-1501607-1">The theory of multiplicative arithmetic functions</a>, Transactions of the American Mathematical Society, Vol. 33, No. 2 (1931), pp. 579-662.
%H A077610 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/UnitaryDivisor.html">Unitary Divisor</a>.
%H A077610 <a href="/index/Ra#rational">Index entries for sequences related to enumerating the rationals</a>.
%F A077610 d is unitary divisor of n <=> gcd(n, d) = d and gcd(n/d, d) = 1. - _Peter Luschny_, Jun 13 2025
%e A077610 1;
%e A077610 1, 2;
%e A077610 1, 3;
%e A077610 1, 4;
%e A077610 1, 5;
%e A077610 1, 2, 3, 6;
%e A077610 1, 7;
%e A077610 1, 8;
%e A077610 1, 9;
%e A077610 1, 2, 5, 10;
%e A077610 1, 11;
%p A077610 with(numtheory);
%p A077610 # returns the number of unitary divisors of n and a list of them, from _N. J. A. Sloane_, May 01 2013
%p A077610 f:=proc(n)
%p A077610 local ct,i,t1,ans;
%p A077610 ct:=0; ans:=[];
%p A077610 t1:=divisors(n);
%p A077610 for i from 1 to nops(t1) do
%p A077610 d:=t1[i];
%p A077610 if igcd(d,n/d)=1 then ct:=ct+1; ans:=[op(ans),d]; fi;
%p A077610 od:
%p A077610 RETURN([ct,ans]);
%p A077610 end;
%p A077610 # Alternatively:
%p A077610 isUnitary := (n, d) -> igcd(n, d) = d and igcd(n/d, d) = 1:
%p A077610 aList := n -> select(k -> isUnitary(n, k), [seq(1..n)]): # _Peter Luschny_, Jun 13 2025
%t A077610 row[n_] := Select[ Divisors[n], GCD[#, n/#] == 1 &]; Table[row[n], {n, 1, 30}] // Flatten (* _Jean-François Alcover_, Oct 22 2012 *)
%o A077610 (Haskell)
%o A077610 a077610 n k = a077610_row n !! k
%o A077610 a077610_row n = [d | d <- [1..n], let (n',m) = divMod n d,
%o A077610                      m == 0, gcd d n' == 1]
%o A077610 a077610_tabf = map a077610_row [1..]
%o A077610 -- _Reinhard Zumkeller_, Feb 12 2012
%o A077610 (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]))))
%o A077610 v=[];for(n=1,20,v=concat(v,row(n)));v \\ _Charles R Greathouse IV_, Sep 02 2015
%o A077610 (PARI) row(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d);} \\ _Michel Marcus_, Oct 11 2015
%o A077610 (Python)
%o A077610 from math import gcd
%o A077610 def is_unitary(n, d) -> bool: return gcd(n, d) == d and gcd(n//d, d) == 1
%o A077610 def aList(n) -> list[int]: return [k for k in range(1, n+1) if is_unitary(n, k)]
%o A077610 for n in range(1, 31): print(aList(n))  # _Peter Luschny_, Jun 13 2025
%Y A077610 Cf. A037445, A027750, A034444 (row lengths), A034448 (row sums); A206778.
%K A077610 nonn,tabf
%O A077610 1,3
%A A077610 _Eric W. Weisstein_, Nov 11 2002