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.

A089579 Total number of perfect powers > 1 below 10^n.

This page as a plain text file.
%I A089579 #55 Aug 13 2024 11:21:06
%S A089579 3,11,39,123,365,1109,3393,10489,32668,102229,320988,1010194,3184136,
%T A089579 10046919,31723590,100216743,316694003,1001003330,3164437423,
%U A089579 10004650116,31632790242,100021566155,316274216760,1000100055682,3162493192563,10000464300849,31623776828239,100002154796112
%N A089579 Total number of perfect powers > 1 below 10^n.
%C A089579 k is a perfect power <=> there exist integers a and b, b > 1, and k = a^b.
%C A089579 From _Robert G. Wilson v_, Jul 17 2016: (Start)
%C A089579 Limit_{n->oo} a(n)/sqrt(10^n) = 1.
%C A089579 A089580(n) - a(n) = A275358(n).
%C A089579 The four terms which make up the difference between A089580(2) - a(2) are: 16 = 2^4 = 4^2, 64 = 2^6 = 4^3 = 8^2 and 81 = 3^4 = 9^2; one for 16, two for 64 and one for 81 making a total of 4. See A117453.
%C A089579 (End)
%H A089579 Robert G. Wilson v, <a href="/A089579/b089579.txt">Table of n, a(n) for n = 1..100</a>
%F A089579 a(n) = A070428(n) - 2 for n >= 2.
%e A089579 For n=2, the 11 perfect powers > 1 below 10^2 = 100 are: 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 81. - _Michael B. Porter_, Jul 18 2016
%t A089579 Table[lim=10^n-1; Sum[ -(Floor[lim^(1/k)]-1)*MoebiusMu[k], {k,2,Floor[Log[2,lim]]}], {n,30}] (* _T. D. Noe_, Nov 16 2006 *)
%o A089579 (SageMath)
%o A089579 def A089579(n):
%o A089579     gen = (p for p in srange(2, 10^n) if p.is_perfect_power())
%o A089579     return sum(1 for _ in gen)
%o A089579 print([A089579(n) for n in range(1, 7)])  # _Peter Luschny_, Sep 15 2023
%o A089579 (Python)
%o A089579 from sympy import mobius, integer_nthroot
%o A089579 def A089579(n): return int(sum(mobius(x)*(1-integer_nthroot(10**n,x)[0]) for x in range(2,(10**n).bit_length())))-1 if n>1 else 3 # _Chai Wah Wu_, Aug 13 2024
%Y A089579 Cf. A001597, A070428, A089580, A275358.
%K A089579 nonn
%O A089579 1,1
%A A089579 _Martin Renner_, Dec 29 2003
%E A089579 a(9)-a(10) from _Martin Renner_, Oct 02 2004
%E A089579 More terms from _T. D. Noe_, Nov 16 2006
%E A089579 More precise name by _Hugo Pfoertner_, Sep 15 2023