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.
%I A085972 #8 Aug 20 2024 12:23:11 %S A085972 0,1,2,2,3,4,5,5,5,6,7,8,9,10,11,11,12,13,14,15,16,17,18,19,19,20,20, %T A085972 21,22,23,24,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,40,41, %U A085972 42,43,44,45,46,47,48,49,50,51,52,53,54,54,55,56,57,58,59,60,61 %N A085972 Number of numbers <= n that are primes or not prime powers. %C A085972 a(n) = Max{k: A085971(k)<=n}; %C A085972 a(n) = n-A085501(n) = A000720(n)+n-A065515(n) = A085970(n)+A000720(n). %t A085972 Accumulate[Table[If[PrimeQ[n]||(!PrimePowerQ[n]),1,0],{n,80}]]-1 (* _Harvey P. Dale_, Oct 13 2022 *) %o A085972 (Python) %o A085972 from sympy import primepi, integer_nthroot %o A085972 def A085972(n): return n-1-sum(primepi(integer_nthroot(n,k)[0]) for k in range(2,n.bit_length())) # _Chai Wah Wu_, Aug 20 2024 %K A085972 nonn %O A085972 1,3 %A A085972 _Reinhard Zumkeller_, Jul 06 2003