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.

A377025 Squares and cubes that are not 6th powers.

This page as a plain text file.
%I A377025 #14 Oct 16 2024 20:18:36
%S A377025 4,8,9,16,25,27,36,49,81,100,121,125,144,169,196,216,225,256,289,324,
%T A377025 343,361,400,441,484,512,529,576,625,676,784,841,900,961,1000,1024,
%U A377025 1089,1156,1225,1296,1331,1369,1444,1521,1600,1681,1728,1764,1849,1936,2025
%N A377025 Squares and cubes that are not 6th powers.
%C A377025 Squares and cubes that cannot be written as both a square and a cube.
%C A377025 {A002760}\{A001014}.
%C A377025 A125643 minus the repeated terms.
%t A377025 lim=2025;Select[Union[Range[Floor[lim^(1/2)]]^2,Range[Floor[lim^(1/3)]]^3],!IntegerQ[#^(1/6)]&] (* _James C. McMahon_, Oct 16 2024 *)
%o A377025 (Python)
%o A377025 from math import isqrt
%o A377025 from sympy import integer_nthroot
%o A377025 def A377025(n):
%o A377025     def bisection(f,kmin=0,kmax=1):
%o A377025         while f(kmax) > kmax: kmax <<= 1
%o A377025         while kmax-kmin > 1:
%o A377025             kmid = kmax+kmin>>1
%o A377025             if f(kmid) <= kmid:
%o A377025                 kmax = kmid
%o A377025             else:
%o A377025                 kmin = kmid
%o A377025         return kmax
%o A377025     def f(x): return n+x+(integer_nthroot(x,6)[0]<<1)-integer_nthroot(x,3)[0]-isqrt(x)
%o A377025     return bisection(f,n,n)
%Y A377025 Cf. A002760, A125643, A001014.
%K A377025 nonn,easy
%O A377025 1,1
%A A377025 _Chai Wah Wu_, Oct 13 2024