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.

A342871 a(n) = Sum_{k=1..n} floor(n^(1/k)), n >= 1.

Original entry on oeis.org

1, 3, 5, 8, 10, 12, 14, 17, 20, 22, 24, 26, 28, 30, 32, 36, 38, 40, 42, 44, 46, 48, 50, 52, 55, 57, 60, 62, 64, 66, 68, 71, 73, 75, 77, 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, 100, 102, 104, 107, 109, 111, 113, 115, 117, 119, 121, 123, 125, 127, 129, 131, 133
Offset: 1

Views

Author

Avid Rajai, Mar 28 2021

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Sum[Floor[n^(1/k)],{k,n}],{n,100}] (* Giorgos Kalogeropoulos, Mar 31 2021 *)
  • PARI
    a(n)=sum(k=1, n, sqrtnint(n,k)) \\ Andrew Howroyd, Mar 28 2021
    
  • PARI
    a(n) = if(n < 2, return(n)); my(c = logint(n, 2)); 2*n + sum(i = 2, c, sqrtnint(n, i)) - c \\ David A. Corneth, Mar 28 2021
    
  • Python
    from sympy import integer_nthroot
    def A342871(n):
        c = 0
        for k in range(1,n+1):
            m = integer_nthroot(n,k)[0]
            if m == 1:
                return c+n-k+1
            else:
                c += m
        return c # Chai Wah Wu, Apr 06 2021

Formula

Lim_{n->infinity} a(n)/n = 2.
a(n) = 2*n + sqrt(n) + O(n^(1/3)).
Lim_{n->infinity} (a(n)/n - 2)*sqrt(n) = 1.
a(n) = A043000(n) + 1 for n >= 2.
a(n) = A255165(n) + n for n >= 2.
a(n) = A089361(n) + 2*n - 1 for n >= 2.
a(n) = n + Sum_{i=1..floor(log_2(n))} floor(n^(1/i) - 1).
If n is in A001597 then a(A001597(m)) - a(A001597(m)-1) = 2 + A253642(m), otherwise a(n) - a(n-1) = 2.
2 <= a(n)/n <= 9/4 iff n >= 4.
1 <= (a(n)/n - 2)*sqrt(n) <= 27/16 iff n >= 27.
2*n + sqrt(n) < a(n) <= 2*n + (27/16)*sqrt(n) iff n >= 27.