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.

A052063 Numbers k such that the decimal expansion of k^3 contains no palindromic substring except single digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 8, 9, 12, 13, 16, 17, 18, 19, 21, 22, 24, 25, 27, 28, 29, 32, 33, 35, 37, 38, 39, 41, 43, 44, 47, 51, 57, 59, 65, 66, 69, 73, 75, 76, 84, 88, 93, 94, 97, 102, 108, 109, 115, 116, 123, 125, 128, 133, 134, 135, 139, 144, 145, 147, 148, 155, 156, 159
Offset: 1

Views

Author

Patrick De Geest, Jan 15 2000

Keywords

Comments

Leading zeros in substring are allowed so 52^3 = 140608 is rejected because 14{060}8 contains a palindromic substring.
Probabilistic analysis strongly suggests that this sequence is not finite. - Franklin T. Adams-Watters, Nov 15 2006

Examples

			19^3 = 6859 -> substrings 68, 85, 59, 685, 859 and 6859 are all non-palindromic.
		

Crossrefs

Programs

  • Mathematica
    testQ@l_ :=
    NoneTrue[Flatten[Table[Partition[l, n, 1], {n, 2, Length@l}], 1],
      PalindromeQ];
    f@nn_ := Select[Range@nn, testQ@IntegerDigits@(#^3) &]; f[300]
    (* Hans Rudolf Widmer, May 13 2022 *)
  • Python
    def nopal(s): return all(ss != ss[::-1] for ss in (s[i:j] for i in range(len(s)-1) for j in range(i+2, len(s)+1)))
    def ok(n): return nopal(str(n**3))
    print([k for k in range(160) if ok(k)]) # Michael S. Branicky, May 13 2022