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.

A278049 a(n) = 3*(Sum_{k=1..n} phi(k)) - 1, where phi = A000010.

Original entry on oeis.org

2, 5, 11, 17, 29, 35, 53, 65, 83, 95, 125, 137, 173, 191, 215, 239, 287, 305, 359, 383, 419, 449, 515, 539, 599, 635, 689, 725, 809, 833, 923, 971, 1031, 1079, 1151, 1187, 1295, 1349, 1421, 1469, 1589, 1625, 1751, 1811, 1883, 1949, 2087, 2135, 2261, 2321, 2417, 2489, 2645, 2699, 2819, 2891, 2999
Offset: 1

Views

Author

N. J. A. Sloane, Nov 22 2016

Keywords

Crossrefs

Cf. m*(Sum_{k=1..n} phi(k)) - 1: A015614 (m=1), A018805 (m=2), this sequence (m=3).

Programs

  • Maple
    with(numtheory);
    f:=n->3*add(phi(r),r=1..n)-1;
    [seq(f(r),r=1..50)];
  • Mathematica
    Table[3 Sum[EulerPhi@ k, {k, n}] - 1, {n, 57}] (* Michael De Vlieger, Dec 16 2016 *)
  • Python
    from functools import lru_cache
    @lru_cache(maxsize=None)
    def A278049(n): # based on second formula in A018805
        if n == 0:
            return -1
        c, j = 0, 2
        k1 = n//j
        while k1 > 1:
            j2 = n//k1 + 1
            c += (j2-j)*(2*A278049(k1)-1)//3
            j, k1 = j2, n//j2
        return 3*(n*(n-1)-c+j)//2 - 1 # Chai Wah Wu, Mar 25 2021

Formula

G.f.: (1/(1 - x)) * (-x + 3 * Sum_{k>=1} mu(k) * x^k / (1 - x^k)^2). - Ilya Gutkovskiy, Feb 14 2020