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.

A365670 Number of perfect powers k which are not prime powers, and 1 < k < 10^n.

This page as a plain text file.
%I A365670 #27 Aug 15 2024 02:02:09
%S A365670 0,1,14,72,257,873,2838,9085,28979,92145,292832,930124,2953569,
%T A365670 9376798,29760901,94434276,299569798,950072891,3012393832,9549260877,
%U A365670 30264906899,95902117819,303839485659,962486295193,3048497625289,9654373954803,30571355398031,96797106918709
%N A365670 Number of perfect powers k which are not prime powers, and 1 < k < 10^n.
%C A365670 k is a perfect power (A001597) <=> there exist integers m and b, b > 1, m >= 1, and k = m^b.
%C A365670 k is a prime power (A246655) <=> there exist integers p and b, b >= 1, p is a prime, and k = p^b.
%H A365670 Plot2, <a href="https://oeis.org/plot2a?name1=A267574&amp;name2=A089579&amp;tform1=untransformed&amp;tform2=untransformed&amp;shift=0&amp;radiop1=ratio&amp;drawlines=true">A267574(n)/A089579(n)</a>.
%F A365670 a(n) = A089579(n) - A267574(n).
%F A365670 a(n) = card({k: 1 < k < 10^n and k in A131605}).
%F A365670 If k = m^b is a term counted by this sequence then base(k) = m is a term of A024619.
%e A365670 There are 14 perfect powers less than 1000 which are not prime powers:
%e A365670 6^2, 10^2, 12^2, 14^2, 6^3, 15^2, 18^2, 20^2, 21^2, 22^2, 24^2, 26^2, 28^2, 30^2.
%o A365670 (SageMath)
%o A365670 def A365670(n):
%o A365670     gen = (p for p in srange(2, 10^n)
%o A365670            if p.is_perfect_power() and not p.is_prime_power())
%o A365670     return sum(1 for _ in gen)
%o A365670 print([A365670(n) for n in range(1, 7)])
%o A365670 (Python)
%o A365670 from sympy import mobius, integer_nthroot, primepi
%o A365670 def A365670(n): return int(sum(mobius(x)*(1-(a:=integer_nthroot(10**n,x)[0]))-primepi(a) for x in range(2,(10**n).bit_length())))-1 if n>1 else n-1 # _Chai Wah Wu_, Aug 14 2024
%Y A365670 Cf. A089579, A267574, A131605, A001597, A246655, A024619.
%K A365670 nonn
%O A365670 1,3
%A A365670 _Peter Luschny_, Sep 16 2023
%E A365670 Data based on A089579 and A267574.