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.

A377702 Perfect-powers except for powers of 2.

This page as a plain text file.
%I A377702 #10 Nov 07 2024 08:36:46
%S A377702 9,25,27,36,49,81,100,121,125,144,169,196,216,225,243,289,324,343,361,
%T A377702 400,441,484,529,576,625,676,729,784,841,900,961,1000,1089,1156,1225,
%U A377702 1296,1331,1369,1444,1521,1600,1681,1728,1764,1849,1936,2025,2116,2187,2197
%N A377702 Perfect-powers except for powers of 2.
%C A377702 Perfect-powers (A001597) are numbers with a proper integer root, complement A007916.
%e A377702 The terms together with their prime indices begin:
%e A377702      9: {2,2}
%e A377702     25: {3,3}
%e A377702     27: {2,2,2}
%e A377702     36: {1,1,2,2}
%e A377702     49: {4,4}
%e A377702     81: {2,2,2,2}
%e A377702    100: {1,1,3,3}
%e A377702    121: {5,5}
%e A377702    125: {3,3,3}
%e A377702    144: {1,1,1,1,2,2}
%e A377702    169: {6,6}
%e A377702    196: {1,1,4,4}
%e A377702    216: {1,1,1,2,2,2}
%e A377702    225: {2,2,3,3}
%e A377702    243: {2,2,2,2,2}
%e A377702    289: {7,7}
%e A377702    324: {1,1,2,2,2,2}
%t A377702 Select[Range[1000],GCD@@FactorInteger[#][[All,2]]>1&&!IntegerQ[Log[2,#]]&]
%o A377702 (Python)
%o A377702 from sympy import mobius, integer_nthroot
%o A377702 def A377702(n):
%o A377702     def bisection(f,kmin=0,kmax=1):
%o A377702         while f(kmax) > kmax: kmax <<= 1
%o A377702         while kmax-kmin > 1:
%o A377702             kmid = kmax+kmin>>1
%o A377702             if f(kmid) <= kmid:
%o A377702                 kmax = kmid
%o A377702             else:
%o A377702                 kmin = kmid
%o A377702         return kmax
%o A377702     def f(x): return int(n-2+x+(l:=x.bit_length())+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(2,l)))
%o A377702     return bisection(f,n+1,n+1) # _Chai Wah Wu_, Nov 06 2024
%Y A377702 Including the powers of 2 gives A001597, counted by A377435.
%Y A377702 For prime-powers we have A061345.
%Y A377702 These terms are counted by A377467, for non-perfect-powers A377701.
%Y A377702 A000961 lists the powers of primes, differences A057820.
%Y A377702 A001597 lists the perfect-powers, differences A053289, seconds A376559.
%Y A377702 A007916 lists the non-perfect-powers, differences A375706, seconds A376562.
%Y A377702 A081676 gives the greatest perfect-power <= n.
%Y A377702 A131605 lists perfect-powers that are not prime-powers.
%Y A377702 A188951 counts perfect-powers less than 2^n.
%Y A377702 A377468 gives the least perfect-power > n.
%Y A377702 Cf. A014210, A014234, A023055, A045542, A052410, A065514, A069623, A246655, A304521, A336416, A345531, A366833.
%K A377702 nonn
%O A377702 1,1
%A A377702 _Gus Wiseman_, Nov 05 2024