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.

A340585 Noncube perfect powers.

This page as a plain text file.
%I A340585 #27 Aug 14 2024 10:04:15
%S A340585 4,9,16,25,32,36,49,81,100,121,128,144,169,196,225,243,256,289,324,
%T A340585 361,400,441,484,529,576,625,676,784,841,900,961,1024,1089,1156,1225,
%U A340585 1296,1369,1444,1521,1600,1681,1764,1849,1936,2025,2048,2116,2187,2209,2304,2401,2500
%N A340585 Noncube perfect powers.
%C A340585 This was the original definition of A239870. However, the true definition of that sequence seems to be slightly different.
%H A340585 Hugo Pfoertner, <a href="/A340585/b340585.txt">Table of n, a(n) for n = 1..10000</a>
%F A340585 Sum_{n>=1} 1/a(n) = 1 - zeta(3) + Sum_{k>=2} mu(k)*(1-zeta(k)) = 1 - A002117 + A072102 = 0.6724074652... - _Amiram Eldar_, Jan 12 2021
%p A340585 filter:= proc(n) local g;
%p A340585   g:= igcd(op(ifactors(n)[2][..,2]));
%p A340585   g > 1 and (g mod 3 <> 0)
%p A340585 end proc:
%p A340585 select(filter, [$1..10000]); # _Robert Israel_, Jan 12 2021
%t A340585 Select[Range[2, 2500], (g = GCD @@ FactorInteger[#][[;; , 2]]) > 1 && !Divisible[g, 3] &] (* _Amiram Eldar_, Jan 12 2021 *)
%o A340585 (PARI) for(n=2,2500,if( ispower(n) % 3, print1(n,", ")))
%o A340585 (Python)
%o A340585 from math import isqrt
%o A340585 from sympy import mobius, integer_nthroot
%o A340585 def A340585(n):
%o A340585     def f(x): return int(n+x-isqrt(x)+sum(mobius(k)*(integer_nthroot(x,k)[0]-1) for k in range(5,x.bit_length())))
%o A340585     kmin, kmax = 1,2
%o A340585     while f(kmax) >= kmax:
%o A340585         kmax <<= 1
%o A340585     while True:
%o A340585         kmid = kmax+kmin>>1
%o A340585         if f(kmid) < kmid:
%o A340585             kmax = kmid
%o A340585         else:
%o A340585             kmin = kmid
%o A340585         if kmax-kmin <= 1:
%o A340585             break
%o A340585     return kmax # _Chai Wah Wu_, Aug 14 2024
%Y A340585 Cf. A000578, A001597, A002117, A007412, A072102, A076467, A097054, A239728.
%K A340585 nonn
%O A340585 1,1
%A A340585 _Hugo Pfoertner_, Jan 12 2021