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.

A002760 Squares and cubes.

Original entry on oeis.org

0, 1, 4, 8, 9, 16, 25, 27, 36, 49, 64, 81, 100, 121, 125, 144, 169, 196, 216, 225, 256, 289, 324, 343, 361, 400, 441, 484, 512, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1000, 1024, 1089, 1156, 1225, 1296, 1331, 1369, 1444, 1521, 1600, 1681, 1728, 1764, 1849
Offset: 1

Views

Author

Keywords

Comments

Catalan's Conjecture states that 8 and 9 are the only pair of consecutive numbers in this sequence. The conjecture was established in 2003 by Mihilescu.
Subsequence of A022549. - Reinhard Zumkeller, Jul 17 2010

References

  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 68.
  • Clifford A. Pickover, The Math Book, Sterling, NY, 2009; see p. 236.

Crossrefs

Cf. A131799; union of A000290 and A000578.
First differences in A075052. [From Zak Seidov, May 10 2010]

Programs

  • Magma
    [n: n in [0..1600] | IsIntegral(n^(1/3)) or IsIntegral(n^(1/2))]; // Bruno Berselli, Feb 09 2016
    
  • Mathematica
    nMax=2000;Union[Range[0,nMax^(1/2)]^2,Range[0,nMax^(1/3)]^3] (* Vladimir Joseph Stephan Orlovsky, Apr 11 2011 *)
    nxt[n_] := Min[ Floor[1 + Sqrt[n]]^2, Floor[1 + n^(1/3)]^3]; NestList[ nxt, 0, 55] (* Robert G. Wilson v, Aug 16 2014 *)
  • PARI
    isok(n) = issquare(n) || ispower(n, 3); \\ Michel Marcus, Mar 29 2016
    
  • Python
    from math import isqrt
    from sympy import integer_nthroot
    def A002760(n):
        def f(x): return n-1+x+integer_nthroot(x,6)[0]-integer_nthroot(x,3)[0]-isqrt(x)
        m, k = n-1, f(n-1)
        while m != k:
            m, k = k, f(k)
        return m # Chai Wah Wu, Aug 09 2024

Formula

Sum_{n>=2} 1/a(n) = zeta(2) + zeta(3) - zeta(6). - Amiram Eldar, Dec 19 2020