login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A076407 Sum of perfect powers <= n. 2

%I #21 Oct 20 2023 05:17:08

%S 1,1,1,5,5,5,5,13,22,22,22,22,22,22,22,38,38,38,38,38,38,38,38,38,63,

%T 63,90,90,90,90,90,122,122,122,122,158,158,158,158,158,158,158,158,

%U 158,158,158,158,158,207,207,207,207,207,207,207,207,207,207,207,207,207

%N Sum of perfect powers <= n.

%H Robert Israel, <a href="/A076407/b076407.txt">Table of n, a(n) for n = 1..10000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/PerfectPower.html">Perfect Powers</a>.

%F a(n) = 1 - Sum_{k=2..floor(log_2(n))} mu(k) * (F(k, floor(n^(1/k))) - 1), where F(k, n) = Sum_{j=1..n} j^k = (Bernoulli(k+1, n+1) - Bernoulli(k+1, 1))/(k+1). - _Daniel Suteu_, Aug 19 2023

%e Sum of the 8 perfect powers <= 32: a(32) = 1+4+8+9+16+25+27+32 = 122.

%p N:= 100: # for a(1)..a(N)

%p V:= Vector(N,1):

%p pps:= {seq(seq(x^k,k=2..floor(log[x](N))),x=2..floor(sqrt(N)))}:

%p for y in pps do

%p V[y..N]:= V[y..N] +~ y

%p od:

%p convert(V,list); # _Robert Israel_, Oct 19 2023

%o (PARI)

%o F(k,n) = (subst(bernpol(k+1), x, n+1) - subst(bernpol(k+1), x, 1)) / (k+1);

%o a(n) = 1 - sum(k=2, logint(n,2), moebius(k) * (F(k, sqrtnint(n,k)) - 1)); \\ _Daniel Suteu_, Aug 19 2023

%Y Cf. A001597, A076408, A069623.

%K nonn

%O 1,4

%A _Reinhard Zumkeller_, Oct 09 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 18 18:48 EDT 2024. Contains 375273 sequences. (Running on oeis4.)