login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #69 Apr 06 2021 12:04:36

%S 1,3,5,8,10,12,14,17,20,22,24,26,28,30,32,36,38,40,42,44,46,48,50,52,

%T 55,57,60,62,64,66,68,71,73,75,77,80,82,84,86,88,90,92,94,96,98,100,

%U 102,104,107,109,111,113,115,117,119,121,123,125,127,129,131,133

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

%H Avid Rajai and David A. Corneth, <a href="/A342871/b342871.txt">Table of n, a(n) for n = 1..10000</a>

%F Lim_{n->infinity} a(n)/n = 2.

%F a(n) = 2*n + sqrt(n) + O(n^(1/3)).

%F Lim_{n->infinity} (a(n)/n - 2)*sqrt(n) = 1.

%F a(n) = A043000(n) + 1 for n >= 2.

%F a(n) = A255165(n) + n for n >= 2.

%F a(n) = A089361(n) + 2*n - 1 for n >= 2.

%F a(n) = n + Sum_{i=1..floor(log_2(n))} floor(n^(1/i) - 1).

%F If n is in A001597 then a(A001597(m)) - a(A001597(m)-1) = 2 + A253642(m), otherwise a(n) - a(n-1) = 2.

%F 2 <= a(n)/n <= 9/4 iff n >= 4.

%F 1 <= (a(n)/n - 2)*sqrt(n) <= 27/16 iff n >= 27.

%F 2*n + sqrt(n) < a(n) <= 2*n + (27/16)*sqrt(n) iff n >= 27.

%t Table[Sum[Floor[n^(1/k)],{k,n}],{n,100}] (* _Giorgos Kalogeropoulos_, Mar 31 2021 *)

%o (PARI) a(n)=sum(k=1, n, sqrtnint(n,k)) \\ _Andrew Howroyd_, Mar 28 2021

%o (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

%o (Python)

%o from sympy import integer_nthroot

%o def A342871(n):

%o c = 0

%o for k in range(1,n+1):

%o m = integer_nthroot(n,k)[0]

%o if m == 1:

%o return c+n-k+1

%o else:

%o c += m

%o return c # _Chai Wah Wu_, Apr 06 2021

%Y Cf. A043000, A255165, A089361, A001597, A253642.

%K nonn

%O 1,2

%A _Avid Rajai_, Mar 28 2021