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.

Showing 1-10 of 19 results. Next

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

Original entry on oeis.org

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

Views

Author

Eric W. Weisstein, Nov 11 2002

Keywords

Comments

n-th row = n-th row of A165430 without repetitions. - Reinhard Zumkeller, Mar 04 2013
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
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

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;
		

Crossrefs

Cf. A037445, A027750, A034444 (row lengths), A034448 (row sums); A206778.

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

A188999 Bi-unitary sigma: sum of the bi-unitary divisors of n.

Original entry on oeis.org

1, 3, 4, 5, 6, 12, 8, 15, 10, 18, 12, 20, 14, 24, 24, 27, 18, 30, 20, 30, 32, 36, 24, 60, 26, 42, 40, 40, 30, 72, 32, 63, 48, 54, 48, 50, 38, 60, 56, 90, 42, 96, 44, 60, 60, 72, 48, 108, 50, 78, 72, 70, 54, 120, 72, 120, 80, 90, 60, 120, 62, 96, 80, 119, 84, 144, 68, 90, 96, 144, 72, 150, 74, 114, 104, 100
Offset: 1

Views

Author

R. J. Mathar, Apr 15 2011

Keywords

Comments

The sequence of bi-unitary perfect numbers obeying a(n) = 2*n consists of only 6, 60, 90 [Wall].
Row sum of row n of the irregular table of the bi-unitary divisors, A222266.

Examples

			The divisors of n=16 are d=1, 2, 4, 8 and 16. The greatest common unitary divisor of (1,16) is 1, of (2,8) is 1, of (4,4) is 4, of (8,2) is 1, of (16,1) is 1 (see A165430). So 1, 2, 8 and 16 are bi-unitary divisors of 16, which sum to a(16) = 1 + 2 + 8 + 16 = 27.
		

Crossrefs

Programs

  • Haskell
    a188999 n = product $ zipWith f (a027748_row n) (a124010_row n) where
       f p e = (p ^ (e + 1) - 1) `div` (p - 1) - (1 - m) * p ^ e' where
               (e', m) = divMod e 2
    -- Reinhard Zumkeller, Mar 04 2013
    
  • Maple
    A188999 := proc(n) local a,e,p,f; a :=1 ; for f in ifactors(n)[2] do e := op(2,f) ; p := op(1,f) ; if type(e,'odd') then a := a*(p^(e+1)-1)/(p-1) ; else a := a*((p^(e+1)-1)/(p-1)-p^(e/2)) ; end if; end do: a ; end proc:
    seq( A188999(n),n=1..80) ;
  • Mathematica
    f[n_] := Select[Divisors[n], Function[d, CoprimeQ[d, n/d]]]; Table[DivisorSum[n, # &, Last@ Intersection[f@ #, f[n/#]] == 1 &], {n, 76}] (* Michael De Vlieger, May 07 2017 *)
    a[n_] := If[n==1, 1, Product[{p, e} = pe; If[OddQ[e], (p^(e+1)-1)/(p-1), ((p^(e+1)-1)/(p-1)-p^(e/2))], {pe, FactorInteger[n]}]]; Array[a, 80] (* Jean-François Alcover, Sep 22 2018 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    gcud(n, m) = vecmax(setintersect(udivs(n), udivs(m)));
    biudivs(n) = select(x->(gcud(x, n/x)==1), divisors(n));
    a(n) = vecsum(biudivs(n)); \\ Michel Marcus, May 07 2017
    
  • PARI
    a(n) = {f = factor(n); for (i=1, #f~, p = f[i,1]; e = f[i,2]; f[i,1] = if (e % 2, (p^(e+1)-1)/(p-1), (p^(e+1)-1)/(p-1) -p^(e/2)); f[i,2] = 1;); factorback(f);} \\ Michel Marcus, Nov 09 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A188999(n): return prod((p**(e+1)-1)//(p-1)-(0 if e&1 else p**(e>>1)) for p,e in factorint(n).items()) # Chai Wah Wu, Dec 28 2024

Formula

Multiplicative with a(p^e) = (p^(e+1)-1)/(p-1) if e is odd, a(p^e) = (p^(e+1)-1)/(p-1) -p^(e/2) if e is even.
a(n) = A000203(n) - A319072(n). - Omar E. Pol, Sep 29 2018
Dirichlet g.f.: zeta(s-1) * zeta(s) * zeta(2*s-1) * Product_{p prime} (1 - 2/p^(2*s-1) + 1/p^(3*s-2) + 1/p^(3*s-1) - 1/p^(4*s-2)). - Amiram Eldar, Aug 28 2023

A222266 Irregular triangle which lists the bi-unitary divisors of n in row n.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 4, 1, 5, 1, 2, 3, 6, 1, 7, 1, 2, 4, 8, 1, 9, 1, 2, 5, 10, 1, 11, 1, 3, 4, 12, 1, 13, 1, 2, 7, 14, 1, 3, 5, 15, 1, 2, 8, 16, 1, 17, 1, 2, 9, 18, 1, 19, 1, 4, 5, 20, 1, 3, 7, 21, 1, 2, 11, 22, 1, 23, 1, 2, 3, 4, 6, 8, 12, 24, 1, 25, 1, 2, 13, 26, 1, 3, 9, 27, 1, 4, 7, 28, 1, 29, 1, 2, 3, 5, 6, 10, 15, 30, 1, 31, 1, 2, 4, 8, 16, 32, 1, 3, 11, 33, 1, 2, 17, 34, 1, 5, 7, 35
Offset: 1

Views

Author

R. J. Mathar, May 05 2013

Keywords

Comments

The bi-unitary divisors of n are the divisors of n such that the largest common unitary divisor of d and n/d is 1, indicated by A165430.
The first difference from the triangle A077609 is in row n=16.
The concept of bi-unitary divisors was introduced by Suryanarayana (1972). - Amiram Eldar, Mar 09 2024

Examples

			The table starts
  1;
  1, 2;
  1, 3;
  1, 4;
  1, 5;
  1, 2, 3, 6;
  1, 7;
  1, 2, 4, 8;
  1, 9;
  1, 2, 5, 10;
  1, 11;
  1, 3, 4, 12;
  1, 13;
  1, 2, 7, 14;
  1, 3, 5, 15;
  1, 2, 8, 16;
  1, 17;
		

Crossrefs

Cf. A077609, A165430, A188999 (row sums), A286324 (row lengths).

Programs

  • Maple
    # Return set of unitary divisors of n.
    A077610_row := proc(n)
        local u,d ;
        u := {} ;
        for d in numtheory[divisors](n) do
            if igcd(n/d,d) = 1 then
                u := u union {d} ;
            end if;
        end do:
        u ;
    end proc:
    # true if d is a bi-unitary divisor of n.
    isbiudiv := proc(n,d)
        if n mod d = 0 then
            A077610_row(d) intersect A077610_row(n/d) ;
            if % = {1} then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    # Return set of bi-unitary divisors of n
    biudivs := proc(n)
        local u,d ;
        u := {} ;
        for d in numtheory[divisors](n) do
            if isbiudiv(n,d) then
                u := u union {d} ;
            end if;
        end do:
        u ;
    end proc:
    for n from 1 to 35 do
        print(op(biudivs(n))) ;
    end do:
  • Mathematica
    f[n_] := Select[Divisors[n], Function[d, CoprimeQ[d, n/d]]]; Table[Function[d, Union@ Flatten@ Select[Transpose@ {d, n/d}, Last@ Intersection[f@ #1, f@ #2] == 1 & @@ # &]]@ Select[Divisors@ n, # <= Floor@ Sqrt@ n &], {n, 35}] (* Michael De Vlieger, May 07 2017 *)
  • PARI
    isbdiv(f, d) = {for (i=1, #f~, if(f[i, 2]%2 == 0 && valuation(d, f[i, 1]) == f[i, 2]/2, return(0))); 1;}
    row(n) = {my(d = divisors(n), f = factor(n), bdiv = []); for(i=1, #d, if(isbdiv(f, d[i]), bdiv = concat(bdiv, d[i]))); bdiv; } \\ Amiram Eldar, Mar 24 2023

A384047 Triangle read by rows: T(n, k) for 1 <= k <= n is the largest divisor of k that is a unitary divisor of n.

Original entry on oeis.org

1, 1, 2, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 1, 5, 1, 2, 3, 2, 1, 6, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 8, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 2, 1, 2, 5, 2, 1, 2, 1, 10, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 3, 4, 1, 3, 1, 4, 3, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13
Offset: 1

Views

Author

Amiram Eldar, May 18 2025

Keywords

Examples

			Triangle begins:
  1
  1, 2
  1, 1, 3
  1, 1, 1, 4
  1, 1, 1, 1, 5
  1, 2, 3, 2, 1, 6
  1, 1, 1, 1, 1, 1, 7
  1, 1, 1, 1, 1, 1, 1, 8
  1, 1, 1, 1, 1, 1, 1, 1, 9
  1, 2, 1, 2, 5, 2, 1, 2, 1, 10
		

Crossrefs

Upper right triangle of A322482.

Programs

  • Mathematica
    udiv[n_] := Select[Divisors[n], CoprimeQ[#, n/#] &]; T[n_, k_] := Max[Intersection[udiv[n], Divisors[k]]]; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten
  • PARI
    udiv(n) = select(x -> gcd(x, n/x) == 1, divisors(n));
    T(n, k) = vecmax(setintersect(udiv(n), divisors(k)));

Formula

T(n, 1) = 1.
T(n, n) = n.
T(n, k) <= A050873(n, k) = gcd(n, k), with equality if n is squarefree (A005117).

A116550 The bi-unitary analog of Euler's totient function of n.

Original entry on oeis.org

1, 1, 2, 3, 4, 3, 6, 7, 8, 6, 10, 8, 12, 9, 9, 15, 16, 12, 18, 14, 14, 15, 22, 17, 24, 18, 26, 21, 28, 15, 30, 31, 23, 24, 25, 29, 36, 27, 28, 31, 40, 21, 42, 35, 34, 33, 46, 36, 48, 36, 37, 42, 52, 39, 42, 46, 42, 42, 58, 34, 60, 45, 51, 63, 50, 35, 66, 56, 51, 38, 70, 62, 72, 54
Offset: 1

Views

Author

Leroy Quet, Mar 16 2006

Keywords

Comments

a(1)=1; for n>1, a(n) is the number of numbers mA225174(m,n)=1. - N. J. A. Sloane, May 01 2013

Examples

			12 = 2^2 * 3^1. Of the positive integers < 12, there are 8 integers where no prime divides these integers the same number of times the prime divides 12: 1, 2 = 2^1, 5 = 5^1, 7 = 7^1, 8 = 2^3, 9 = 3^2, 10 = 2^1 *5^1 and 11 = 11^1. So a(12) = 8. The other positive integers < 12 (3 = 3^1, 4 = 2^2 and 6 = 2^1 * 3^1) each are divisible by at least one prime the same number of times this prime divides 12.
		

References

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

Crossrefs

Programs

  • Maple
    # returns the greatest common unitary divisor of m and n, A225174(m,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;
    A116550:=proc(n)
      global f; local ct,m;
      ct:=0;
      if n = 1 then RETURN(1) else
      for m from 1 to n-1 do
        if f(m,n)=1 then ct:=ct+1; fi;
      od:
      fi;
      ct;
    end; # N. J. A. Sloane, May 01 2013
    A116550 := proc(n)
        local a,k;
        a := 0 ;
        for k from 1 to n do
            if A165430(k,n) = 1 then
                a := a+1 ;
            end if ;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 21 2016
  • Mathematica
    a[1] = 1; a[n_] := With[{pp = Power @@@ FactorInteger[n]}, Count[Range[n], m_ /; Intersection[pp, Power @@@ FactorInteger[m]] == {}]]; Table[a[n], {n, 1, 90}] (* Jean-François Alcover, Sep 05 2013 *)
    phi[x_, n_] := DivisorSum[n, MoebiusMu[#]*Floor[x/#] &]; a[n_] := DivisorSum[n, (-1)^PrimeNu[#]*phi[n/#, #] &, CoprimeQ[#, n/#] &]; Array[a, 100] (* Amiram Eldar, Jul 16 2022 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    gcud(n, m) = vecmax(setintersect(udivs(n), udivs(m)));
    a(n) = if (n==1, 1, sum(k=1, n-1, gcud(n, k) == 1)); \\ Michel Marcus, Nov 09 2017
    
  • PARI
    phi(x,n) = sumdiv(n, d, moebius(d)*floor(x/d));
    a(n) = sumdiv(n, d, (gcd(d, n/d) == 1) * (-1)^omega(d) * phi(n/d,d)); \\ Amiram Eldar, Jul 16 2022

Formula

For n>1, if n = product{p=primes,p|n} p^b(n,p), where each b(n,p) is a positive integer, then a(n) is number of positive integers m, m < n, such that each b(m,p) does not equal b(n,p).
a(n) = Sum_{d|n, gcd(d,n/d)=1} (-1)^omega(d) * phi(x, n), where phi(x, n) = #{1 <= k <= x, gcd(k, n) = 1} = Sum_{d|n} mu(d) * floor(x/d) (Tóth, 2009). - Amiram Eldar, Jul 16 2022

Extensions

More terms from R. J. Mathar, Jan 23 2008
Entry revised by N. J. A. Sloane, May 01 2013

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).

A337490 a(0)=1; for n > 0, a(n) = the greatest common divisor (GCD) of n and the sum of all previous terms if the GCD is not already in the sequence; otherwise a(n) = a(n-1) + n.

Original entry on oeis.org

1, 2, 4, 7, 11, 5, 6, 13, 21, 30, 10, 21, 33, 46, 14, 29, 45, 62, 18, 37, 57, 78, 22, 45, 69, 94, 26, 53, 81, 110, 140, 171, 203, 236, 270, 305, 341, 378, 416, 39, 79, 120, 162, 205, 249, 294, 340, 387, 3, 52, 102, 17, 69, 122, 176, 231, 287, 344, 402, 461, 521, 582, 644, 707, 771, 836, 902, 969
Offset: 0

Views

Author

Scott R. Shannon, Aug 29 2020

Keywords

Comments

The sequence displays the unusual behavior of decreasing 53 times in the first 1975 terms, due to the existence of a GCD which has not previously appeared in the sequence, but then not decreasing again for n up to at least 100 million. In this period there are 37 repeated terms, the first being 21 at n=11 and the last 161202 at n=2054. In the same range many values do not appear, for example 16,23,28,32,36. It is unknown when the sequence decreases again, or if all values eventually appear. The 100 millionth term is 4999999948050717.
See the companion sequence A333980 for the sum of the terms from a(0) to a(n).

Examples

			a(2) = 4 as the sum of all previous terms is a(0)+a(1) = 3, and the GCD of 3 and 2 is 1, which has already appeared in the sequence. Therefore a(2) = a(1) + n = 2 + 2 = 4.
a(4) = 11 as the sum of all previous terms is a(0)+...+a(3) = 14, and the GCD of 14 and 4 is 2. However 2 has already appeared so a(4) = a(3) + n = 7 + 4 = 11.
a(5) = 5 as the sum of all previous terms is a(0)+...+a(4) = 25, and the GCD of 25 and 5 is 5, and as 5 has not previous appeared a(5) = 5.
		

Crossrefs

Cf. A333980, A333826 (same rules but starting a(1)=1), A165430, A064814, A082299, A005132, A336957.

Programs

  • PARI
    lista(nn) = {my(va = vector(nn), s=0); va[1] = 1; s += va[1]; for (n=2, nn, my(g = gcd(n-1, s)); if (#select(x->(x==g), va), va[n] = va[n-1]+n-1, va[n] = g); s += va[n];); va;} \\ Michel Marcus, Sep 05 2020

A200723 The sum of integers k from 1 to n such that the greatest common unitary divisor of k and n is 1.

Original entry on oeis.org

1, 1, 3, 6, 10, 10, 21, 28, 36, 32, 55, 53, 78, 66, 69, 120, 136, 112, 171, 144, 153, 170, 253, 211, 300, 240, 351, 300, 406, 237, 465, 496, 384, 416, 445, 539, 666, 522, 558, 633, 820, 444, 903, 780, 772, 770, 1081, 887, 1176, 912, 951, 1104
Offset: 1

Views

Author

R. J. Mathar, Nov 21 2011

Keywords

Comments

Previous name was "Bi-unitary Euler function of n".
a(n) is the sum over all entries equal to 1 in row A165430(n,), weighted by the column index.

Crossrefs

Programs

  • Haskell
    a200723 = sum . zipWith (*) [1..] . map a063524 . a165430_row
    -- Reinhard Zumkeller, Mar 04 2013
    
  • Maple
    A200723 := proc(n)
            local a,k ;
            a := 0 ;
            for k from 1 to n do
                    if A165430(k,n) = 1 then
                            a := a+ k ;
                    end if;
            end do;
            a ;
    end proc:
    seq(A200723(n),n=1..80) ;
  • Mathematica
    T[n_, k_] := Module[{d = Divisors[GCD[n, k]]}, Max[Select[d, CoprimeQ[#, k/#] && CoprimeQ[#, n/#] &]]]; a[n_] := Sum[k * Boole[T[n, k] == 1], {k, 1, n}]; Array[a, 100] (* Amiram Eldar, May 23 2025 *)
  • PARI
    udivs(n) = {my(d = divisors(n)); select(x->(gcd(x, n/x)==1), d); }
    a(n) = sum(k=1, n, if (vecmax(setintersect(udivs(n), udivs(k))) == 1, k)); \\ Michel Marcus, Jun 28 2023

Formula

a(6) = 1*1 + 4*1 +5*1 = 10 corresponding to the three 1's in row 6 of A165430.

Extensions

New name from Amiram Eldar, May 23 2025

A333980 Partial sums of A337490.

Original entry on oeis.org

1, 3, 7, 14, 25, 30, 36, 49, 70, 100, 110, 131, 164, 210, 224, 253, 298, 360, 378, 415, 472, 550, 572, 617, 686, 780, 806, 859, 940, 1050, 1190, 1361, 1564, 1800, 2070, 2375, 2716, 3094, 3510, 3549, 3628, 3748, 3910, 4115, 4364, 4658, 4998, 5385, 5388, 5440, 5542, 5559, 5628, 5750
Offset: 0

Views

Author

Scott R. Shannon, Sep 04 2020

Keywords

Comments

See A337490 for an explanation of the sequence.

Crossrefs

A275254 The bi-unitary gcd-sum function.

Original entry on oeis.org

1, 3, 5, 7, 9, 14, 13, 15, 17, 25, 21, 30, 25, 36, 43, 31, 33, 47, 37, 57, 61, 58, 45, 64, 49, 69, 53, 82, 57, 108, 61, 63, 99, 91, 113, 99, 73, 102, 117, 117, 81, 163, 85, 132, 141, 124, 93, 130, 97, 135, 155, 157, 105, 146, 181
Offset: 1

Views

Author

R. J. Mathar, Jul 21 2016

Keywords

Comments

Row sums of A165430.

Crossrefs

Programs

  • Maple
    Pstarstar := proc(n)
        add(A165430(k,n),k=1..n) ;
    end proc:
  • Mathematica
    phi[x_, n_] := Sum[Boole[GCD[k, n] == 1], {k, 1, x}]; uphi[1]=1; uphi[n_] := Times @@ (-1 + Power @@@ FactorInteger[n]); a[n_] := DivisorSum[n, uphi[#] * phi[n/#, #] &, GCD[#, n/#] == 1 &]; Array[a, 100] (* Amiram Eldar, Sep 09 2019 *)

Formula

a(n) = Sum_{k=1..n} A165430(n,k).
Sum_{k=1..n} a(k) = c * n^2 * log(n) / 2 + O(n^2), where c = Product_{p prime} (1 - (3*p-1)/(p^2*(p+1))) = zeta(2) * Product_{p prime} (1 - (2*p-1)^2/p^4) = A013661 * A256392 = 0.35823163000196141456... . - Amiram Eldar, Dec 22 2023
Showing 1-10 of 19 results. Next