OFFSET
1,2
LINKS
Avid Rajai and David A. Corneth, Table of n, a(n) for n = 1..10000
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.
MATHEMATICA
Table[Sum[Floor[n^(1/k)], {k, n}], {n, 100}] (* Giorgos Kalogeropoulos, Mar 31 2021 *)
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Avid Rajai, Mar 28 2021
STATUS
approved