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.

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

This page as a plain text file.
%I A072292 #23 Mar 11 2025 18:37:29
%S A072292 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 A072292 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 A072292 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 A072292 Number of proper powers b^d <= n (b > 1, d > 1).
%C A072292 Base b = 1 is excluded since 1 would be 1^d for any degree d (degree of power not well defined).
%H A072292 Reinhard Zumkeller, <a href="/A072292/b072292.txt">Table of n, a(n) for n = 1..10000</a>
%H A072292 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PerfectPower.html">Perfect Power</a>.
%t A072292 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 A072292 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 A072292 (PARI) A072292(n)=n=floor(n)+.5;-sum(k=2,log(n)\log(2),floor(n^(1/k)-1)*moebius(k))
%o A072292 \\ _Charles R Greathouse IV_, Sep 07 2010
%o A072292 (Haskell)
%o A072292 a072292 n = a072292_list !! (n-1)
%o A072292 a072292_list = scanl (+) 0 $ tail a075802_list
%o A072292 -- _Reinhard Zumkeller_, May 26 2012
%o A072292 (Python)
%o A072292 from sympy import mobius, integer_nthroot
%o A072292 def A072292(n): return int(-sum(mobius(k)*(integer_nthroot(n,k)[0]-1) for k in range(2,n.bit_length()))) # _Chai Wah Wu_, Mar 11 2025
%Y A072292 a(i)=A069637(i) for i<36=6^2. Cf. A001597.
%Y A072292 Cf. A075802 (first differences).
%K A072292 nonn,easy,nice
%O A072292 1,8
%A A072292 _Reinhard Zumkeller_, Jul 12 2002
%E A072292 Edited by _Daniel Forgues_, Mar 03 2009