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.

A145388 Sum of (k,n)* for k=1,2,...,n, where (k,n)* is the greatest divisor of k which is a unitary divisor of n.

Original entry on oeis.org

1, 3, 5, 7, 9, 15, 13, 15, 17, 27, 21, 35, 25, 39, 45, 31, 33, 51, 37, 63, 65, 63, 45, 75, 49, 75, 53, 91, 57, 135, 61, 63, 105, 99, 117, 119, 73, 111, 125, 135, 81, 195, 85, 147, 153, 135, 93, 155, 97, 147, 165, 175, 105, 159
Offset: 1

Views

Author

Laszlo Toth, Oct 10 2008

Keywords

Comments

A unitary analog of Pillai's function A018804; another unitary analog of A018804 is A089912.
The sequence is the row sums of the following triangle of (k,n)* with rows n and columns 1 <= k <= n (_R. J. Mathar, Jun 01 2011):
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;
1, 2, 1, 2, 1, 2, 7, 2, 1, 2, 1, 2, 1, 14;
Sum_{k<=x} a(n) = Ax^2 log x + O(x^2) with A = Product(1 - 1/(p+1)^2) * 3/Pi^2 = 0.23584030... where the product is over the primes. That is, the average value of a(n) is A n log n. - Charles R Greathouse IV, Mar 21 2012

Crossrefs

Programs

  • Maple
    A145388 := proc(n) option remember; local pf,p ; if n = 1 then 1; else pf := ifactors(n)[2] ; if nops(pf) = 1 then 2*n-1 ; else mul(procname(op(1,p)^op(2,p)),p=pf) ; end if; end if; end proc:
    seq(A145388(n),n=1..70) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    f[p_, e_] := 2*p^e - 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, May 29 2020 *)
  • PARI
    a(n)=n=factor(n);prod(i=1,#n[,1],2*n[i,1]^n[i,2]-1) \\ Charles R Greathouse IV, Mar 21 2012
    
  • Python
    from math import prod
    from sympy import factorint
    def A145388(n): return prod((p**e<<1)-1 for p,e in factorint(n).items()) # Chai Wah Wu, Feb 13 2025

Formula

Multiplicative: a(p^e) = 2*p^e - 1 for every prime power p^e.
a(n) = Sum_{k=1..n} A034444(n/gcd(n,k)) = Sum_{d|n} A000010(d) * A034444(d). - Daniel Suteu, May 26 2019
a(n) = Sum_{d|n, gcd(d, n/d) = 1} d * uphi(n/d), where uphi is A047994. - Amiram Eldar, May 29 2020
a(n) = Sum_{d|n} abs(A023900(d))*n/d. Verified for the first 10000 terms. - Mats Granvik, Feb 13 2021