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.

A062841 Palindromes of the form k^3-1.

Original entry on oeis.org

0, 7, 999, 999999, 258474852, 999999999, 999999999999, 999999999999999, 999999999999999999, 999999999999999999999, 999999999999999999999999, 999999999999999999999999999, 999999999999999999999999999999, 999999999999999999999999999999999
Offset: 1

Views

Author

Erich Friedman, Jul 21 2001

Keywords

Comments

Sequence is infinite as (10^k)^3-1 is a term for all k >= 0. - Michael S. Branicky, Mar 27 2021

Examples

			999 = 10^3-1 and is a palindrome.
		

Crossrefs

Intersection of A002113 and A068601.

Programs

  • Mathematica
    For[n=0,n<100000000,n++,If[n^3-1==IntegerReverse[n^3-1],Print[n^3-1]]] (* Dylan Delgado, Mar 02 2021 *)
    Select[Range[10^7]^3-1,PalindromeQ] (* The program generates the first ten terms of the sequence. *) (* Harvey P. Dale, Oct 08 2023 *)
  • Python
    def afind(limit):
      for n in range(limit+1):
        s = str(n**3 - 1)
        if s == s[::-1]: print(int(s), end=", ")
    print(afind(10**7)) # Michael S. Branicky, Mar 27 2021

Extensions

One more term from Emeric Deutsch, Feb 26 2005
a(10)-a(14) from Michael S. Branicky, Mar 27 2021