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.

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