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”).

Number of proper powers b^d <= n (b > 1, d > 1).
2

%I #19 Nov 14 2022 17:17:00

%S 0,0,0,1,1,1,1,2,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,5,5,6,6,6,6,6,7,7,7,

%T 7,8,8,8,8,8,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,10,10,10,

%U 10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11

%N Number of proper powers b^d <= n (b > 1, d > 1).

%C Base b = 1 is excluded since 1 would be 1^d for any degree d (degree of power not well defined).

%H Reinhard Zumkeller, <a href="/A072292/b072292.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 Power</a>.

%t a[n_] := (pp = Reap[ Do[ If[b^d <= n, Sow[b^d]], {b, 2, Sqrt[n]}, {d, 2, Log[2, n]}]]; If[pp == {Null, {}}, 0, Length[ Union[ pp[[2, 1]]]]]); Table[a[n], {n, 1, 90}](* _Jean-François Alcover_, May 16 2012 *)

%t Module[{nn=10,pp},pp=Union[Flatten[Table[a^b,{a,2,nn},{b,2,nn}]]];Accumulate[ Table[ If[ MemberQ[pp,n],1,0],{n,2^nn}]]] (* _Harvey P. Dale_, Nov 14 2022 *)

%o (PARI) A072292(n)=n=floor(n)+.5;-sum(k=2,log(n)\log(2),floor(n^(1/k)-1)*moebius(k))

%o \\ _Charles R Greathouse IV_, Sep 07 2010

%o (Haskell)

%o a072292 n = a072292_list !! (n-1)

%o a072292_list = scanl (+) 0 $ tail a075802_list

%o -- _Reinhard Zumkeller_, May 26 2012

%Y a(i)=A069637(i) for i<36=6^2. Cf. A001597.

%Y Cf. A075802 (first differences).

%K nonn,easy,nice

%O 1,8

%A _Reinhard Zumkeller_, Jul 12 2002

%E Edited by _Daniel Forgues_, Mar 03 2009